Mercurial > vim
diff src/mouse.c @ 31194:fa26d002eb2a v9.0.0931
patch 9.0.0931: MS-Windows: mouse column limited to 223
Commit: https://github.com/vim/vim/commit/36446bbb62b466ce873c872b266a29bebbfc9890
Author: Christopher Plewright <chris@createng.com>
Date: Wed Nov 23 22:28:08 2022 +0000
patch 9.0.0931: MS-Windows: mouse column limited to 223
Problem: MS-Windows: mouse column limited to 223.
Solution: Use two bytes for each mouse coordinate. Add the mouse position
to scroll events. (Christopher Plewright, closes #11597)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 23 Nov 2022 23:30:03 +0100 |
parents | a86ee6c0309e |
children | 4545f58c8490 |
line wrap: on
line diff
--- a/src/mouse.c +++ b/src/mouse.c @@ -2308,10 +2308,15 @@ check_termcode_mouse( */ for (;;) { -# ifdef FEAT_GUI - if (gui.in_use) + // For the GUI and for MS-Windows two bytes each are used for row + // and column. Allows for more than 223 columns. +# if defined(FEAT_GUI) || defined(MSWIN) + if (TRUE +# if defined(FEAT_GUI) && !defined(MSWIN) + && gui.in_use +# endif + ) { - // GUI uses more bits for columns > 223 num_bytes = get_bytes_from_buf(tp + *slen, bytes, 5); if (num_bytes == -1) // not enough coordinates return -1;