mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 7.4.1758
Problem: Triggering CursorHoldI when in CTRL-X mode causes problems. Solution: Do not trigger CursorHoldI in CTRL-X mode. Add "!" flag to feedkeys() (test with that didn't work though).
This commit is contained in:
@@ -1526,7 +1526,12 @@ normalchar:
|
|||||||
|
|
||||||
#ifdef FEAT_AUTOCMD
|
#ifdef FEAT_AUTOCMD
|
||||||
/* If typed something may trigger CursorHoldI again. */
|
/* If typed something may trigger CursorHoldI again. */
|
||||||
if (c != K_CURSORHOLD)
|
if (c != K_CURSORHOLD
|
||||||
|
# ifdef FEAT_COMPL_FUNC
|
||||||
|
/* but not in CTRL-X mode, a script can't restore the state */
|
||||||
|
&& ctrl_x_mode == 0
|
||||||
|
# endif
|
||||||
|
)
|
||||||
did_cursorhold = FALSE;
|
did_cursorhold = FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -11547,6 +11547,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
|
|||||||
char_u nbuf[NUMBUFLEN];
|
char_u nbuf[NUMBUFLEN];
|
||||||
int typed = FALSE;
|
int typed = FALSE;
|
||||||
int execute = FALSE;
|
int execute = FALSE;
|
||||||
|
int dangerous = FALSE;
|
||||||
char_u *keys_esc;
|
char_u *keys_esc;
|
||||||
|
|
||||||
/* This is not allowed in the sandbox. If the commands would still be
|
/* This is not allowed in the sandbox. If the commands would still be
|
||||||
@@ -11569,6 +11570,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
|
|||||||
case 't': typed = TRUE; break;
|
case 't': typed = TRUE; break;
|
||||||
case 'i': insert = TRUE; break;
|
case 'i': insert = TRUE; break;
|
||||||
case 'x': execute = TRUE; break;
|
case 'x': execute = TRUE; break;
|
||||||
|
case '!': dangerous = TRUE; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11592,9 +11594,11 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
|
|||||||
/* Avoid a 1 second delay when the keys start Insert mode. */
|
/* Avoid a 1 second delay when the keys start Insert mode. */
|
||||||
msg_scroll = FALSE;
|
msg_scroll = FALSE;
|
||||||
|
|
||||||
++ex_normal_busy;
|
if (!dangerous)
|
||||||
|
++ex_normal_busy;
|
||||||
exec_normal(TRUE);
|
exec_normal(TRUE);
|
||||||
--ex_normal_busy;
|
if (!dangerous)
|
||||||
|
--ex_normal_busy;
|
||||||
msg_scroll |= save_msg_scroll;
|
msg_scroll |= save_msg_scroll;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -748,6 +748,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 */
|
||||||
|
/**/
|
||||||
|
1758,
|
||||||
/**/
|
/**/
|
||||||
1757,
|
1757,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user