Some echo tests added.
This commit is contained in:
1 parent
8a32895457
commit
eb5b2038d6
38 files changed
+1739
-31
No files matched your search
@@ -50,11 +50,12 @@ func TypingEcho(event atspi.Event, previousText string, options Options) (string
|
||||
return characterEcho, kind
|
||||
}
|
||||
context := event.Source.TextBeforeCaret
|
||||
if context == "" {
|
||||
context = event.Source.Text
|
||||
}
|
||||
if (event.Payload == "\n" || event.Payload == "\t") && strings.TrimSpace(context) == "" {
|
||||
// After splitting a line, Text describes the following line, which
|
||||
// may already contain text. Completion belongs to the prior caret.
|
||||
context = previousText
|
||||
} else if context == "" && !event.Source.TextCaretKnown {
|
||||
context = event.Source.Text
|
||||
}
|
||||
if options.EnableEchoBySentence {
|
||||
if sentence := completedSentence(context, event.Payload); sentence != "" {
|
||||
|
||||
Reference in new issue
Block a user