mirror of
https://github.com/vim/vim.git
synced 2025-09-30 04:44:14 -04:00
patch 8.2.4400: MS-Windows: cannot use the mouse in the console with VIMDLL
Problem: MS-Windows: cannot use the mouse in the console with VIMDLL. Solution: use add_char2buf() instead of fix_input_buffer(). (closes #9784, closes #9769)
This commit is contained in:
@@ -1138,18 +1138,9 @@ ins_char_typebuf(int c, int modifier)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char_u *p = buf + len;
|
char_u *end = add_char2buf(c, buf + len);
|
||||||
int char_len = (*mb_char2bytes)(c, p);
|
*end = NUL;
|
||||||
#ifdef FEAT_GUI
|
len = end - buf;
|
||||||
int save_gui_in_use = gui.in_use;
|
|
||||||
|
|
||||||
gui.in_use = FALSE;
|
|
||||||
#endif
|
|
||||||
// if the character contains CSI or K_SPECIAL bytes they need escaping
|
|
||||||
len += fix_input_buffer(p, char_len);
|
|
||||||
#ifdef FEAT_GUI
|
|
||||||
gui.in_use = save_gui_in_use;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
(void)ins_typebuf(buf, KeyNoremap, 0, !KeyTyped, cmd_silent);
|
(void)ins_typebuf(buf, KeyNoremap, 0, !KeyTyped, cmd_silent);
|
||||||
return len;
|
return len;
|
||||||
@@ -3671,7 +3662,9 @@ fix_input_buffer(char_u *buf, int len)
|
|||||||
p += 2;
|
p += 2;
|
||||||
i -= 2;
|
i -= 2;
|
||||||
}
|
}
|
||||||
// When the GUI is not used CSI needs to be escaped.
|
# ifndef MSWIN
|
||||||
|
// When not on MS-Windows and the GUI is not used CSI needs to be
|
||||||
|
// escaped.
|
||||||
else if (!gui.in_use && p[0] == CSI)
|
else if (!gui.in_use && p[0] == CSI)
|
||||||
{
|
{
|
||||||
mch_memmove(p + 3, p + 1, (size_t)i);
|
mch_memmove(p + 3, p + 1, (size_t)i);
|
||||||
@@ -3680,6 +3673,7 @@ fix_input_buffer(char_u *buf, int len)
|
|||||||
*p = (int)KE_CSI;
|
*p = (int)KE_CSI;
|
||||||
len += 2;
|
len += 2;
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (p[0] == NUL || (p[0] == K_SPECIAL
|
if (p[0] == NUL || (p[0] == K_SPECIAL
|
||||||
|
@@ -750,6 +750,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 */
|
||||||
|
/**/
|
||||||
|
4400,
|
||||||
/**/
|
/**/
|
||||||
4399,
|
4399,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user