Read command-history recalls in Wine edit fields

MUSHclient consumes queued Up/Down keys in PreTranslateMessage before the
Edit control receives WM_KEYDOWN. It recalls commands with SetWindowText
followed by SetSel at the end of the replacement. The editor subclass only
refreshed its snapshot for WM_SETTEXT, so the recalled command was silent
or followed by a stray character or blank from the caret update. Recalling
equal-length commands also leaves the final caret position unchanged.

Observe Up/Down for the focused standard Edit control in WH_GETMESSAGE,
excluding Ctrl-modified navigation. Associate the next successful
WM_SETTEXT with that retrieved key and announce the bounded recalled text
as an existing ordered text-read action. Report empty input as blank.
Consume the pending recall after the replacement and suppress the ensuing
EM_SETSEL feedback so each recalled command is announced once.

Reset recall tracking on subsequent retrieved messages, actual focus and
ordinary dispatched navigation. Preserve snapshot refreshes and normal
Left/Right reading after recalls. Keep password and foreground/focus
exclusion in place, leave unrelated programmatic text updates silent, and
check the control class before accessing the shared attachment property
so Scintilla's different state structure is untouched. Both native hook
architectures receive the fix through the existing build.

Extend the Edit fixture with application-side pretranslation of queued
history arrows. Assert the exact ordered feedback for Up/Down, equal-length
entries, rapid recalls, empty input and horizontal navigation afterward.
Require silence for unchanged history boundaries, unrelated programmatic
updates, protected fields and independently unprotected background fields.
Document history behavior and live MUSHclient acceptance steps.

Validation used a private Xorg dummy display, disposable Wine prefixes and
recording D-Bus services, with GUI checks run sequentially:

- cmake --build build --parallel
- ctest --test-dir build --output-on-failure: all four checks passed
- python3 tests/menu_integration.py --build-dir build --fixture edit
- The Edit check with --32-bit, --32-bit --late-helper, and
  --32-bit --restart-helper
- python3 tests/menu_integration.py --build-dir build --fixture winforms
  --32-bit
- python3 tests/menu_integration.py --build-dir build --fixture notepad
- python3 tests/menu_integration.py --build-dir build --fixture menu
  --32-bit
- git diff --check

The new 32-bit history regression failed against the original hook,
recording only blank actions, and passed with the fix. Final 32-bit,
64-bit and Windows Forms editor checks passed, including existing typing,
selection, deletion, Unicode, password and read-only assertions.

Built and installed the helper into the existing user-local installation,
backed up the previous five files and verified the installed artifacts.
The user subsequently confirmed that the installed fix works in MUSHclient.
Physical braille acceptance was not separately established.
This commit is contained in:
deedra committed 2026-10-14 15:46:26 -07:00
1 parent 7d3ac09ea1
commit b808c6686a
5 files changed
+112 -12

No files matched your search

+17 -10
View File
@@ -262,9 +262,13 @@ Ctrl+End line reading, and Up/Down navigation in a read-only multiline output
control. Typing checks include repeated letters, spaces, Enter/Tab, accented
characters, surrogate pairs, selection replacement, documents beyond the full
snapshot limit, and silence for password/background/read-only fields and
input rejected at the text limit. Both 32-bit and 64-bit fixtures use the same
assertions. Lifecycle variants attach after the control has focus or
restart the helper without closing it. Every text action must have an established
input rejected at the text limit. Command-history checks consume queued Up/Down
before dispatch, then replace the text and move the caret as MUSHclient does.
They require ordered, single announcements for equal-length and rapid recalls
and empty input, with no password, background or unrelated programmatic output.
Both 32-bit and 64-bit fixtures use the same assertions. Lifecycle variants
attach after the control has focus or restart the helper without closing it.
Every text action must have an established
focus source, matching the Go reader's filtering contract.
The Notepad fixture launches Wine's actual `notepad.exe` and uses `SendInput`
@@ -273,13 +277,16 @@ It checks resulting document text as well as recorded accessibility output. Thes
tests use a recording D-Bus service; they do not run the full reader or prove
audible typing echo, physical keys, or a physical braille display.
For live MUSHclient acceptance, install the helper and reopen MUSHclient so the
updated 32-bit DLL can load. In the command field, check Left/Right and
Ctrl+Left/Right feedback without submitting a command. Use Ctrl+Tab to reach
the read-only output notepad supplied by the Aardwolf review-buffer plugin;
check Up/Down line reading and Left/Right characters there, then return to
the command field. Check plugin menus and dialogs still work, and repeat after
restarting the reader. These hooks provide caret feedback; independent review
For live MUSHclient acceptance, install the helper, restart Cthulhu and reopen
MUSHclient so the updated 32-bit DLL can load. In the command field, check Left/Right and
Ctrl+Left/Right feedback without submitting a command. Use Up/Down to recall
existing command history. Check each recalled command is spoken once,
including equal-length entries and `blank` when returning to empty input.
Do not submit recalled commands just to test speech.
Use Ctrl+Tab to reach the read-only output notepad supplied by the Aardwolf
review-buffer plugin; check Up/Down line reading and Left/Right characters
there, then return to the command field. Check plugin menus and dialogs still
work, and repeat after restarting the reader. These hooks provide caret feedback; independent review
commands use the optional flat-review protocol described above. Native braille
routing into Wine text remains unsupported.