aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-21 14:40:43 +0800
committerGitHub <noreply@github.com>2023-08-21 14:40:43 +0800
commit3b0515e674f279d6504a0fc055808cdf01eead99 (patch)
tree39f1120f66af1d5fb573241d06ce5d2d70d9a028 /src/nvim/ex_getln.c
parent91d8f2ac534a51859c0e3c6562d07c94b27f4478 (diff)
parent6aa29d0f01e715fe51de4f66dee377e4c1726229 (diff)
downloadrneovim-3b0515e674f279d6504a0fc055808cdf01eead99.tar.gz
rneovim-3b0515e674f279d6504a0fc055808cdf01eead99.tar.bz2
rneovim-3b0515e674f279d6504a0fc055808cdf01eead99.zip
Merge pull request #24816 from zeertzjq/vim-8.1.2044
vim-patch:8.1.{2044,2046,2047,2048,2053,2066,2067,2068,2069,2099},8.2.4299: SafeState, state()
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 89f5e92c33..6af79bfd21 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -943,6 +943,8 @@ theend:
static int command_line_check(VimState *state)
{
+ CommandLineState *s = (CommandLineState *)state;
+
redir_off = true; // Don't redirect the typed command.
// Repeated, because a ":redir" inside
// completion may switch it on.
@@ -952,6 +954,9 @@ static int command_line_check(VimState *state)
// that occurs while typing a command should
// cause the command not to be executed.
+ // Trigger SafeState if nothing is pending.
+ may_trigger_safestate(s->xpc.xp_numfiles <= 0);
+
cursorcmd(); // set the cursor on the right spot
ui_cursor_shape();
return 1;