mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(prompt): add missing changes from v8.1.0036
v8.1.0036 is already marked as ported, but missed out changes that depended on v8.1.0035.
This commit is contained in:
parent
28134f4e78
commit
d6ea0741c9
@ -2241,12 +2241,21 @@ static void leaving_window(win_T *const win)
|
|||||||
// callback we need to break out of the Insert mode loop.
|
// callback we need to break out of the Insert mode loop.
|
||||||
if (State & INSERT) {
|
if (State & INSERT) {
|
||||||
stop_insert_mode = true;
|
stop_insert_mode = true;
|
||||||
|
if (bt_prompt(win->w_buffer) && win->w_buffer->b_prompt_insert == NUL) {
|
||||||
|
win->w_buffer->b_prompt_insert = 'A';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void entering_window(win_T *const win)
|
static void entering_window(win_T *const win)
|
||||||
FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
|
// When switching to a prompt buffer that was in Insert mode, don't stop
|
||||||
|
// Insert mode, it may have been set in leaving_window().
|
||||||
|
if (bt_prompt(win->w_buffer) && win->w_buffer->b_prompt_insert != NUL) {
|
||||||
|
stop_insert_mode = false;
|
||||||
|
}
|
||||||
|
|
||||||
// When entering the prompt window may restart Insert mode.
|
// When entering the prompt window may restart Insert mode.
|
||||||
restart_edit = win->w_buffer->b_prompt_insert;
|
restart_edit = win->w_buffer->b_prompt_insert;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user