diff src/normal.c @ 29790:8874cb642b70 v9.0.0234

patch 9.0.0234: cannot make difference between :normal end and argument char Commit: https://github.com/vim/vim/commit/8d69637133e17370491b83da8657a15b991c2f76 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 21 10:40:07 2022 +0100 patch 9.0.0234: cannot make difference between :normal end and argument char Problem: Cannot make difference between the end of :normal and a character in its argument. Solution: Add the "typebuf_was_empty" flag. (closes #10950)
author Bram Moolenaar <Bram@vim.org>
date Sun, 21 Aug 2022 11:45:04 +0200
parents bc6cf208b1b4
children 31c598083364
line wrap: on
line diff
--- a/src/normal.c
+++ b/src/normal.c
@@ -6808,11 +6808,11 @@ nv_esc(cmdarg_T *cap)
 #endif
     }
 #ifdef FEAT_CMDWIN
-    else if (cmdwin_type != 0 && ex_normal_busy)
+    else if (cmdwin_type != 0 && ex_normal_busy && typebuf_was_empty)
     {
 	// When :normal runs out of characters while in the command line window
-	// vgetorpeek() will return ESC.  Exit the cmdline window to break the
-	// loop.
+	// vgetorpeek() will repeatedly return ESC.  Exit the cmdline window to
+	// break the loop.
 	cmdwin_result = K_IGNORE;
 	return;
     }