diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-03-06 07:52:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-06 07:52:11 +0800 |
commit | e389b189021cb6b72cfd7583ce6fb5d8d3346d45 (patch) | |
tree | f5f58f759ac4bbd8bd00d5684b7ba079f1946db9 /src/nvim/normal.c | |
parent | 533d671271eb76373d9940161e7bfd201b7e7c2b (diff) | |
download | rneovim-e389b189021cb6b72cfd7583ce6fb5d8d3346d45.tar.gz rneovim-e389b189021cb6b72cfd7583ce6fb5d8d3346d45.tar.bz2 rneovim-e389b189021cb6b72cfd7583ce6fb5d8d3346d45.zip |
vim-patch:9.0.1385: g'Esc is considered an error (#22544)
Problem: g'Esc is considered an error.
Solution: Make g'Esc silently abandon the command. (closes vim/vim#12110)
https://github.com/vim/vim/commit/f86dea8119f3141e3d2c680219036d1511101f9b
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index f7c99d5991..890215e754 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -963,7 +963,8 @@ normal_end: may_trigger_modechanged(); // Redraw the cursor with another shape, if we were in Operator-pending // mode or did a replace command. - if (s->c || s->ca.cmdchar == 'r') { + if (s->c || s->ca.cmdchar == 'r' + || (s->ca.cmdchar == 'g' && s->ca.nchar == 'r')) { ui_cursor_shape(); // may show different cursor shape } @@ -1162,7 +1163,7 @@ static int normal_execute(VimState *state, int key) State = MODE_NORMAL; - if (s->ca.nchar == ESC) { + if (s->ca.nchar == ESC || s->ca.extra_char == ESC) { clearop(&s->oa); s->command_finished = true; goto finish; @@ -4706,7 +4707,7 @@ static void nv_vreplace(cmdarg_T *cap) return; } - if (checkclearopq(cap->oap) || cap->extra_char == ESC) { + if (checkclearopq(cap->oap)) { return; } |