Patch 9.0.0812

8 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 21, 2022, 8:04:23 AM10/21/22
to vim...@googlegroups.com

Patch 9.0.0812
Problem: GUI mouse scrollwheel mappings don't work.
Solution: Add check for "gui.in_use". (Christopher Plewright, closes #11418)
Files: src/getchar.c


*** ../vim-9.0.0811/src/getchar.c 2022-10-20 17:59:34.610510336 +0100
--- src/getchar.c 2022-10-21 12:56:51.229338401 +0100
***************
*** 2529,2534 ****
--- 2529,2537 ----
&& (typebuf.tb_buf[typebuf.tb_off + 1] == KS_MODIFIER
# if defined(MSWIN)
|| (typebuf.tb_len >= 3
+ # ifdef FEAT_GUI
+ && !gui.in_use
+ # endif
&& typebuf.tb_buf[typebuf.tb_off + 1] == KS_EXTRA
&& (typebuf.tb_buf[typebuf.tb_off + 2] == KE_MOUSEUP
|| typebuf.tb_buf[typebuf.tb_off + 2] == KE_MOUSEDOWN
***************
*** 2542,2548 ****
// The GUI code sends CSI KS_MODIFIER {flags}, but mappings expect
// K_SPECIAL KS_MODIFIER {flags}.
// MS-Windows sends mouse scroll events CSI KS_EXTRA {what}, but
! // mappings expect K_SPECIAL KS_EXTRA {what}.
tb_c1 = K_SPECIAL;
}
#endif
--- 2545,2551 ----
// The GUI code sends CSI KS_MODIFIER {flags}, but mappings expect
// K_SPECIAL KS_MODIFIER {flags}.
// MS-Windows sends mouse scroll events CSI KS_EXTRA {what}, but
! // non-GUI mappings expect K_SPECIAL KS_EXTRA {what}.
tb_c1 = K_SPECIAL;
}
#endif
*** ../vim-9.0.0811/src/version.c 2022-10-21 12:05:41.918401161 +0100
--- src/version.c 2022-10-21 13:03:14.303733110 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 812,
/**/

--
SOLDIER: Where did you get the coconuts?
ARTHUR: Through ... We found them.
SOLDIER: Found them? In Mercea. The coconut's tropical!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Bram Moolenaar

unread,
Oct 21, 2022, 9:19:24 AM10/21/22
to vim...@googlegroups.com
There are two ways of constructing a software design. One way is to make
it so simple that there are obviously no deficiencies. The other way
is to make it so complicated that there are no obvious deficiencies.
-C.A.R. Hoare
Reply all
Reply to author
Forward
0 new messages