Some echo tests added.

This commit is contained in:
Storm Dragon committed 2026-10-27 00:40:49 -04:00
1 parent 8a32895457
commit eb5b2038d6
38 files changed
+1739 -31

No files matched your search

+17 -2
View File
@@ -137,6 +137,11 @@ func processEventsWithAttributes(
Flash(string, config.BrailleOptions) bool
})
defer webScripts.reset()
messages := newMessagingController(ctx, speech, focusGate, live, writeClipboardText)
messages.braille, _ = brailleOutput.(interface {
Flash(string, config.BrailleOptions) bool
})
defer messages.stop()
logger.Info("listening for focus events")
browser, _ := inputSource.(*browserModeController)
var modeResults <-chan browserModeResult
@@ -182,6 +187,7 @@ func processEventsWithAttributes(
speak(event)
}
clearObjectFocus := func() {
messages.cancelCopyRequest()
ocrSession.Retire()
state.clearOwnedFocus(brailleOutput, browser, objectReview, speech)
}
@@ -225,7 +231,7 @@ func processEventsWithAttributes(
brailleOutput: brailleOutput, foreground: foreground, debounce: debounce,
clearOwnedFocus: clearOwnedFocus, syncForeground: syncForeground,
flushTerminalDeletion: flushTerminalDeletion, speak: speak, webScripts: webScripts,
wineReview: wineReview,
wineReview: wineReview, messaging: messages,
}
var lockChanges <-chan struct{}
@@ -241,10 +247,14 @@ func processEventsWithAttributes(
wineReview.retire()
}
webScripts.reset()
messages.reset()
state.owner.clear()
clearOwnedFocus()
case <-wineReviewChanges:
syncForeground()
case result := <-messages.results:
syncForeground()
messages.copied(result)
case <-webScripts.due:
webScripts.flush()
case <-foregroundChanges:
@@ -335,7 +345,12 @@ func processEventsWithAttributes(
case input.SetColumnHeadersRow, input.ClearColumnHeadersRow, input.SetRowHeadersColumn, input.ClearRowHeadersColumn:
reviewHandler.configureCalcHeader(command)
default:
reviewHandler.whereAmI()
if _, _, ok := input.MessageCommandIndex(command); ok {
syncForeground()
messages.review(command, state.current)
} else {
reviewHandler.whereAmI()
}
}
case <-attributeRequests:
if !focusGate.Locked() {