diff src/normal.c @ 32049:717a1a8dc751 v9.0.1356

patch 9.0.1356: cannot cancel "gr" with Esc Commit: https://github.com/vim/vim/commit/4f026ea9f1ad9db262f0dba522768c84e5ae37b4 Author: zeertzjq <zeertzjq@outlook.com> Date: Sun Feb 26 14:47:24 2023 +0000 patch 9.0.1356: cannot cancel "gr" with Esc Problem: Cannot cancel "gr" with Esc. Solution: Make "gr<Esc>" do nothing. (closes https://github.com/vim/vim/issues/12064)
author Bram Moolenaar <Bram@vim.org>
date Sun, 26 Feb 2023 16:00:05 +0100
parents 55926b4f2246
children cbf0ed5c83d0
line wrap: on
line diff
--- a/src/normal.c
+++ b/src/normal.c
@@ -515,7 +515,8 @@ normal_cmd_get_more_chars(
 	    cap->nchar = cap->extra_char;
 	    idx = find_command(cap->cmdchar);
 	}
-	else if ((cap->nchar == 'n' || cap->nchar == 'N') && cap->cmdchar == 'g')
+	else if ((cap->nchar == 'n' || cap->nchar == 'N')
+							&& cap->cmdchar == 'g')
 	    cap->oap->op_type = get_op_type(*cp, NUL);
 	else if (*cp == Ctrl_BSL)
 	{
@@ -5024,7 +5025,7 @@ nv_vreplace(cmdarg_T *cap)
 	return;
     }
 
-    if (checkclearopq(cap->oap))
+    if (checkclearopq(cap->oap) || cap->extra_char == ESC)
 	return;
 
     if (!curbuf->b_p_ma)