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.
942b4541a2

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:
957cf67d50
This commit is contained in:
Sean Dewar
2021-11-07 20:57:09 +00:00
parent b9ab4c1dea
commit 1fffccc5d6
3 changed files with 6 additions and 3 deletions

View File

@@ -995,7 +995,7 @@ static int insert_handle_key(InsertState *s)
// In a prompt window CTRL-W is used for window commands.
// Use Shift-CTRL-W to delete a word.
stuffcharReadbuff(Ctrl_W);
restart_edit = 'i';
restart_edit = 'A';
s->nomove = true;
s->count = 0;
return 0;