mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 03:08:27 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user