diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-11-07 20:57:09 +0000 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-12-07 11:34:26 +0000 |
commit | 1fffccc5d62e4fa01c1ce52405da359723defb1c (patch) | |
tree | 0dafe394164c1d246737f803f54cadd7f87bd692 /src/nvim/screen.c | |
parent | b9ab4c1dea0ee65950f8c1ec374ccab744a81acb (diff) | |
download | rneovim-1fffccc5d62e4fa01c1ce52405da359723defb1c.tar.gz rneovim-1fffccc5d62e4fa01c1ce52405da359723defb1c.tar.bz2 rneovim-1fffccc5d62e4fa01c1ce52405da359723defb1c.zip |
vim-patch:8.1.0064: typing CTRL-W in a prompt buffer shows mode "-- --"
Problem: Typing CTRL-W in a prompt buffer shows mode "-- --".
Solution: Set restart_edit to 'A' and check for it.
https://github.com/vim/vim/commit/942b4541a2d8e8df8369ab70e112dbbbe0c7c0aa
Nvim already checked for 'i' in showmode(), so this bug was fixed with <C-W>
(though this patch now changes <C-W> to use 'A').
However, the missing changes I ported for v8.1.0036 use 'A' when a callback
leaves the window in insert mode and edit gets restarted, so this bug was
possible there.
Modify showmode() restart_edit condition to match v8.2.1978:
https://github.com/vim/vim/commit/957cf67d50516ba98716f59c9e1cb6412ec1535d
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 2ce2be0bfd..d015ef110e 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -6930,7 +6930,7 @@ int showmode(void) do_mode = ((p_smd && msg_silent == 0) && ((State & TERM_FOCUS) || (State & INSERT) - || restart_edit + || restart_edit != NUL || VIsual_active)); if (do_mode || reg_recording != 0) { // Don't show mode right now, when not redrawing or inside a mapping. @@ -7010,7 +7010,7 @@ int showmode(void) } msg_puts_attr(_(" INSERT"), attr); } else if (restart_edit == 'I' || restart_edit == 'i' - || restart_edit == 'a') { + || restart_edit == 'a' || restart_edit == 'A') { msg_puts_attr(_(" (insert)"), attr); } else if (restart_edit == 'R') { msg_puts_attr(_(" (replace)"), attr); |