Patch 8.2.4400 (after 8.2.4394)
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)
Files: src/getchar.c
*** ../vim-8.2.4399/src/getchar.c 2022-02-15 19:52:52.886723403 +0000
--- src/getchar.c 2022-02-16 17:47:16.971126388 +0000
***************
*** 1138,1155 ****
}
else
{
! char_u *p = buf + len;
! int char_len = (*mb_char2bytes)(c, p);
! #ifdef FEAT_GUI
! 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);
return len;
--- 1138,1146 ----
}
else
{
! char_u *end = add_char2buf(c, buf + len);
! *end = NUL;
! len = end - buf;
}
(void)ins_typebuf(buf, KeyNoremap, 0, !KeyTyped, cmd_silent);
return len;
***************
*** 3671,3677 ****
p += 2;
i -= 2;
}
! // When the GUI is not used CSI needs to be escaped.
else if (!gui.in_use && p[0] == CSI)
{
mch_memmove(p + 3, p + 1, (size_t)i);
--- 3662,3670 ----
p += 2;
i -= 2;
}
! # 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)
{
mch_memmove(p + 3, p + 1, (size_t)i);
***************
*** 3680,3685 ****
--- 3673,3679 ----
*p = (int)KE_CSI;
len += 2;
}
+ # endif
else
#endif
if (p[0] == NUL || (p[0] == K_SPECIAL
*** ../vim-8.2.4399/src/version.c 2022-02-16 16:33:24.801844678 +0000
--- src/version.c 2022-02-16 17:50:58.842671930 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4400,
/**/
--
hundred-and-one symptoms of being an internet addict:
51. You put a pillow case over your laptop so your lover doesn't see it while
you are pretending to catch your breath.
/// 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 ///