From ceed85ea431b8fb4f694e4fca09f97e2a22f69d9 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 23 Feb 2021 20:25:11 -0500 Subject: [PATCH] vim-patch:8.2.2548: May get stuck in the cmdline window using :normal Problem: May get stuck in the cmdline window using :normal. Solution: Have nv_esc() return K_IGNORE. https://github.com/vim/vim/commit/7d41410a455ba62128655beb91c35d3fba299287 --- src/nvim/normal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 1e15ded643..530c0a17e5 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -7574,6 +7574,12 @@ static void nv_esc(cmdarg_T *cap) got_int = false; /* don't stop executing autocommands et al. */ return; } + } else if (cmdwin_type != 0 && ex_normal_busy) { + // When :normal runs out of characters while in the command line window + // vgetorpeek() will return ESC. Exit the cmdline window to break the + // loop. + cmdwin_result = K_IGNORE; + return; } if (VIsual_active) {