mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Fix assertion failure in xterm mouse tracking.
The original version of the xterm mouse tracking protocol did not
support character-cell coordinates greater than 223. If term_mouse()
got one, it would fail to construct an escape sequence for the mouse
event, and would then call ldisc_send() with a zero-length string -
which fails an assertion that I added in November (c269dd0135
) on the
occasion of moving ldisc_echoedit_update() into its own function. So
the corresponding operation before that change would have done a
gratuitous ldisc_echoedit_update(), which is exactly the sort of thing
the assertion was there to catch :-)
Later extensions to the mouse tracking protocol support larger
coordinates anyway (try ESC[?1006h or ESC[?1015h in addition to the
ESC[?1000h that turns the whole system on in the first place). It's
only clients that don't use one of those extensions which would have
had the problem.
Thanks to Mirko Wolle for the report.
This commit is contained in:
parent
7524da621b
commit
0de1ac95e5
@ -6043,7 +6043,8 @@ void term_mouse(Terminal *term, Mouse_Button braw, Mouse_Button bcooked,
|
||||
} else if (c <= 223 && r <= 223) {
|
||||
len = sprintf(abuf, "\033[M%c%c%c", encstate + 32, c + 32, r + 32);
|
||||
}
|
||||
ldisc_send(term->ldisc, abuf, len, 0);
|
||||
if (len > 0)
|
||||
ldisc_send(term->ldisc, abuf, len, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user