Patch 8.2.0835
Problem: Motif: mapping <C-bslash> still doesn't work.
Solution: Accept CSI for K_SPECIAL. Do not apply CTRL to the character
early. (closes #6150)
Files: src/getchar.c, src/gui_x11.c
*** ../vim-8.2.0834/src/getchar.c 2020-05-03 22:57:26.973427368 +0200
--- src/getchar.c 2020-05-28 20:44:25.091199970 +0200
***************
*** 2279,2284 ****
--- 2279,2293 ----
|| ((compl_cont_status & CONT_LOCAL)
&& (tb_c1 == Ctrl_N || tb_c1 == Ctrl_P))))
{
+ #ifdef FEAT_GUI
+ if (gui.in_use && tb_c1 == CSI && typebuf.tb_len >= 2
+ && typebuf.tb_buf[typebuf.tb_off + 1] == KS_MODIFIER)
+ {
+ // The GUI code sends CSI KS_MODIFIER {flags}, but mappings expect
+ // K_SPECIAL KS_MODIFIER {flags}.
+ tb_c1 = K_SPECIAL;
+ }
+ #endif
#ifdef FEAT_LANGMAP
if (tb_c1 == K_SPECIAL)
nolmaplen = 2;
***************
*** 2337,2343 ****
if (mp->m_keys[mlen] != c2)
#else
if (mp->m_keys[mlen] !=
! typebuf.tb_buf[typebuf.tb_off + mlen])
#endif
break;
}
--- 2346,2352 ----
if (mp->m_keys[mlen] != c2)
#else
if (mp->m_keys[mlen] !=
! typebuf.tb_buf[typebuf.tb_off + mlen])
#endif
break;
}
*** ../vim-8.2.0834/src/gui_x11.c 2020-05-26 22:14:23.089012942 +0200
--- src/gui_x11.c 2020-05-28 20:57:26.346246038 +0200
***************
*** 920,926 ****
--- 920,931 ----
if (ev_press->state & ShiftMask)
modifiers |= MOD_MASK_SHIFT;
if (ev_press->state & ControlMask)
+ {
modifiers |= MOD_MASK_CTRL;
+ if (len == 1 && string[0] < 0x20)
+ // Use the character before applyng CTRL.
+ string[0] += 0x40;
+ }
if (ev_press->state & Mod1Mask)
modifiers |= MOD_MASK_ALT;
if (ev_press->state & Mod4Mask)
*** ../vim-8.2.0834/src/version.c 2020-05-27 23:15:12.846004351 +0200
--- src/version.c 2020-05-28 20:59:01.446042693 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 835,
/**/
--
hundred-and-one symptoms of being an internet addict:
196. Your computer costs more than your car.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202005281904.04SJ4NL61186749%40masaka.moolenaar.net.