mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 9.0.0812: GUI mouse scrollwheel mappings don't work
Problem: GUI mouse scrollwheel mappings don't work. Solution: Add check for "gui.in_use". (Christopher Plewright, closes #11418)
This commit is contained in:
committed by
Bram Moolenaar
parent
2435adf8eb
commit
7fa02bcb3b
@@ -2529,6 +2529,9 @@ handle_mapping(
|
|||||||
&& (typebuf.tb_buf[typebuf.tb_off + 1] == KS_MODIFIER
|
&& (typebuf.tb_buf[typebuf.tb_off + 1] == KS_MODIFIER
|
||||||
# if defined(MSWIN)
|
# if defined(MSWIN)
|
||||||
|| (typebuf.tb_len >= 3
|
|| (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 + 1] == KS_EXTRA
|
||||||
&& (typebuf.tb_buf[typebuf.tb_off + 2] == KE_MOUSEUP
|
&& (typebuf.tb_buf[typebuf.tb_off + 2] == KE_MOUSEUP
|
||||||
|| typebuf.tb_buf[typebuf.tb_off + 2] == KE_MOUSEDOWN
|
|| typebuf.tb_buf[typebuf.tb_off + 2] == KE_MOUSEDOWN
|
||||||
@@ -2542,7 +2545,7 @@ handle_mapping(
|
|||||||
// The GUI code sends CSI KS_MODIFIER {flags}, but mappings expect
|
// The GUI code sends CSI KS_MODIFIER {flags}, but mappings expect
|
||||||
// K_SPECIAL KS_MODIFIER {flags}.
|
// K_SPECIAL KS_MODIFIER {flags}.
|
||||||
// MS-Windows sends mouse scroll events CSI KS_EXTRA {what}, but
|
// MS-Windows sends mouse scroll events CSI KS_EXTRA {what}, but
|
||||||
// mappings expect K_SPECIAL KS_EXTRA {what}.
|
// non-GUI mappings expect K_SPECIAL KS_EXTRA {what}.
|
||||||
tb_c1 = K_SPECIAL;
|
tb_c1 = K_SPECIAL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
812,
|
||||||
/**/
|
/**/
|
||||||
811,
|
811,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user