You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you enable pixel mouse position reporting like this:
stdout.write_all(b"\x1B[?1016h").unwrap();
Then it works fine except if you move your mouse to the top of the screen, then it can report 0, and that causes this code to panic:
// See http://www.xfree86.org/current/ctlseqs.html#Mouse%20Tracking
// The upper left character position on the terminal is denoted as 1,1.
// Subtract 1 to keep it synced with cursor
let cx = next_parsed::<u16>(&mut split)? - 1;
let cy = next_parsed::<u16>(&mut split)? - 1;
Because 0 - 1 underflows. Simple hack: use saturating subtract. I suspect nobody is going to care about the difference between pixel 0 and 1.
OS
Linux
Terminal/Console
Kitty
The text was updated successfully, but these errors were encountered:
If you enable pixel mouse position reporting like this:
Then it works fine except if you move your mouse to the top of the screen, then it can report 0, and that causes this code to panic:
Because
0 - 1
underflows. Simple hack: use saturating subtract. I suspect nobody is going to care about the difference between pixel 0 and 1.OS
Linux
Terminal/Console
Kitty
The text was updated successfully, but these errors were encountered: