This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository terminology.
View the commit online.
commit d363f811441405ab6a9ea55521b9b1b20da33228
Author: Boris Faure <[email protected]>
AuthorDate: Sun Nov 29 15:15:57 2026 +0000
termio: send CSI A/B for the alt-screen wheel without DECCKM
On the alternate screen with no mouse reporting, the wheel always
answered SS3 A/B (ESC O A/B), whatever DECCKM said. xterm
(scrollbar.c:756-781) and ghostty (Surface.zig:3685-3712) send CSI A/B
when DECCKM is off and SS3 A/B when it is on, so an application that
left DECCKM off never saw the scroll keys. Pick ESC [ or ESC O from
termstate.appcursor.
tests/decset-1007.sh is unchanged; only its checksum in tests.results
moves, since the two wheel replies without DECCKM become ESC [ A and
ESC [ B. The reply with DECCKM set stays ESC O A.
---
src/bin/termiointernals.c | 5 +++--
tests/tests.results | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/bin/termiointernals.c b/src/bin/termiointernals.c
index 748fc92e..ae35aeb0 100644
--- a/src/bin/termiointernals.c
+++ b/src/bin/termiointernals.c
@@ -2169,9 +2169,10 @@ termio_internal_mouse_wheel(Termio *sd,
{
if (sd->pty->altbuf && sd->pty->termstate.alternate_scroll)
{
- /* Emulate cursors */
+ /* Emulate cursors: SS3 A/B in application cursor mode,
+ * CSI A/B otherwise, as in xterm (scrollbar.c) and ghostty */
buf[0] = 0x1b;
- buf[1] = 'O';
+ buf[1] = sd->pty->termstate.appcursor ? 'O' : '[';
buf[2] = (ev->z < 0) ? 'A' : 'B';
buf[3] = 0;
termpty_write(sd->pty, buf, strlen(buf));
diff --git a/tests/tests.results b/tests/tests.results
index c1851e5f..30354329 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -210,7 +210,7 @@ osc52_long.sh e9a6f4e0ea7bb6fbdaba74988d88b67c
osc-can.sh 74530a1ced8bc249989e9175c8d29e99
dsr-color-scheme.sh 68f86326864cc9988c84dc20babe4156
decset-2027.sh 0a1c82f8293b216ac59148326b539079
-decset-1007.sh 91cf48d5620608640de90759c8bb958f
+decset-1007.sh 4a1bd737a335e2f650a2e8c5703aa66c
decset-2031.sh 60c4f2ca88a2a4dbae8f7453c633d074
ascii_run_prefix.sh 5413bed756d01dc51d09609c8512b8ec
xtgettcap.sh 300a0521bca0f2bf50bc00161f8fc195
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.