diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-03-05 21:15:06 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-03-05 21:15:06 +0000 |
commit | f86dea8119f3141e3d2c680219036d1511101f9b (patch) | |
tree | 741993d7ef54fa51f7ea56c8975b56d55cdf8b57 /src/normal.c | |
parent | b0b6b8b07eaeac5a22370d2b8ecefb6dd026c541 (diff) |
patch 9.0.1385: g'Esc is considered an errorv9.0.1385
Problem: g'Esc is considered an error.
Solution: Make g'Esc silently abandon the command. (closes #12110)
Diffstat (limited to 'src/normal.c')
-rw-r--r-- | src/normal.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/normal.c b/src/normal.c index da01480ebc..6f947a6c3c 100644 --- a/src/normal.c +++ b/src/normal.c @@ -899,7 +899,7 @@ normal_cmd( State = MODE_NORMAL; - if (ca.nchar == ESC) + if (ca.nchar == ESC || ca.extra_char == ESC) { clearop(oap); if (restart_edit == 0 && goto_im()) @@ -984,7 +984,8 @@ normal_end: #ifdef CURSOR_SHAPE // Redraw the cursor with another shape, if we were in Operator-pending // mode or did a replace command. - if (prev_finish_op || ca.cmdchar == 'r') + if (prev_finish_op || ca.cmdchar == 'r' + || (ca.cmdchar == 'g' && ca.nchar == 'r')) { ui_cursor_shape(); // may show different cursor shape # ifdef FEAT_MOUSESHAPE @@ -5025,7 +5026,7 @@ nv_vreplace(cmdarg_T *cap) return; } - if (checkclearopq(cap->oap) || cap->extra_char == ESC) + if (checkclearopq(cap->oap)) return; if (!curbuf->b_p_ma) @@ -5903,7 +5904,7 @@ nv_g_cmd(cmdarg_T *cap) else #endif // "g^A/g^X": sequentially increment visually selected region - if (VIsual_active) + if (VIsual_active) { cap->arg = TRUE; cap->cmdchar = cap->nchar; |