mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.0835: Motif: mapping <C-bslash> still doesn't work
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)
This commit is contained in:
parent
3f65c66df9
commit
c998370562
@ -2279,6 +2279,15 @@ handle_mapping(
|
|||||||
|| ((compl_cont_status & CONT_LOCAL)
|
|| ((compl_cont_status & CONT_LOCAL)
|
||||||
&& (tb_c1 == Ctrl_N || tb_c1 == Ctrl_P))))
|
&& (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
|
#ifdef FEAT_LANGMAP
|
||||||
if (tb_c1 == K_SPECIAL)
|
if (tb_c1 == K_SPECIAL)
|
||||||
nolmaplen = 2;
|
nolmaplen = 2;
|
||||||
@ -2337,7 +2346,7 @@ handle_mapping(
|
|||||||
if (mp->m_keys[mlen] != c2)
|
if (mp->m_keys[mlen] != c2)
|
||||||
#else
|
#else
|
||||||
if (mp->m_keys[mlen] !=
|
if (mp->m_keys[mlen] !=
|
||||||
typebuf.tb_buf[typebuf.tb_off + mlen])
|
typebuf.tb_buf[typebuf.tb_off + mlen])
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -920,7 +920,12 @@ gui_x11_key_hit_cb(
|
|||||||
if (ev_press->state & ShiftMask)
|
if (ev_press->state & ShiftMask)
|
||||||
modifiers |= MOD_MASK_SHIFT;
|
modifiers |= MOD_MASK_SHIFT;
|
||||||
if (ev_press->state & ControlMask)
|
if (ev_press->state & ControlMask)
|
||||||
|
{
|
||||||
modifiers |= MOD_MASK_CTRL;
|
modifiers |= MOD_MASK_CTRL;
|
||||||
|
if (len == 1 && string[0] < 0x20)
|
||||||
|
// Use the character before applyng CTRL.
|
||||||
|
string[0] += 0x40;
|
||||||
|
}
|
||||||
if (ev_press->state & Mod1Mask)
|
if (ev_press->state & Mod1Mask)
|
||||||
modifiers |= MOD_MASK_ALT;
|
modifiers |= MOD_MASK_ALT;
|
||||||
if (ev_press->state & Mod4Mask)
|
if (ev_press->state & Mod4Mask)
|
||||||
|
@ -746,6 +746,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 */
|
||||||
|
/**/
|
||||||
|
835,
|
||||||
/**/
|
/**/
|
||||||
834,
|
834,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user