vim-patch:8.2.1781: writing to prompt buffer interferes with insert mode

Problem:    Writing to prompt buffer interferes with insert mode.
Solution:   Use win_enter() instead of just setting "curwin". (Ben Jackson,
            closes vim/vim#7035)
4537bcc889

Vim test will be skipped, so add a Lua test.
The problem boils down to the use of aucmd_restbuf in a callback, so just test
that (via nvim_buf_set_lines).
This commit is contained in:
Sean Dewar
2021-11-07 21:28:11 +00:00
parent 1fffccc5d6
commit 38cd91de5f
3 changed files with 48 additions and 2 deletions

View File

@@ -1208,7 +1208,7 @@ win_found:
win_T *const save_curwin = win_find_by_handle(aco->save_curwin_handle);
if (save_curwin != NULL) {
curwin = save_curwin;
win_enter(save_curwin, true);
} else {
// Hmm, original window disappeared. Just use the first one.
curwin = firstwin;