Stop disabling mouse tracking

Commit eecc223 (Recognize and disable mouse-tracking CSI events,
2021-02-06) made fish disable mouse reporting whenever we receive a
mouse event.  This was because at the time we didn't have a parser
for mouse inputs.  We do now, so let's allow users to toggle mouse
support with

	printf '\e[?1000h'
	printf '\e[?1000l'

Currently the only mouse even we support is left click (to move cursor
in commandline, select pager items).

Part of #4918
See #12026

[ja: tweak patch and commit message]
This commit is contained in:
ken
2025-11-06 18:19:54 +08:00
committed by Johannes Altmanninger
parent 60b50afefd
commit 199475b6ca
6 changed files with 15 additions and 36 deletions

View File

@@ -8,25 +8,25 @@ sp.expect_prompt()
# Five char sequence.
sp.send("\x1b[tDE")
sp.expect_str("reader: Disabling mouse tracking")
sp.expect_str("reader: mouse event")
# Six char sequence.
sp.send("\x1b[MABC")
sp.expect_str("reader: Disabling mouse tracking")
sp.expect_str("reader: mouse event")
# Nine char sequences.
sp.send("\x1b[TABCDEF")
sp.expect_str("reader: Disabling mouse tracking")
sp.expect_str("reader: mouse event")
# sleep to catch up under ASAN
sp.sleep(0.5)
# Extended SGR sequences.
sp.send("\x1b[<1;2;3M")
sp.expect_str("reader: Disabling mouse tracking")
sp.expect_str("reader: mouse event")
sp.send("\x1b[<1;2;3m")
sp.expect_str("reader: Disabling mouse tracking")
sp.expect_str("reader: mouse event")
sp.sendline("echo done")
sp.expect_prompt("done")