mirror of
https://github.com/vim/vim.git
synced 2025-09-30 04:44:14 -04:00
patch 9.0.1582: :stopinsert may not work in a popup close handler
Problem: :stopinsert may not work in a popup close handler. (Ben Jackson) Solution: Restore stop_insert_mode when appropriate. (closes #12452, closes #12434)
This commit is contained in:
@@ -1657,11 +1657,13 @@ aucmd_restbuf(
|
||||
}
|
||||
win_found:
|
||||
#ifdef FEAT_JOB_CHANNEL
|
||||
;
|
||||
int save_stop_insert_mode = stop_insert_mode;
|
||||
// May need to stop Insert mode if we were in a prompt buffer.
|
||||
leaving_window(curwin);
|
||||
// Do not stop Insert mode when already in Insert mode before.
|
||||
if (aco->save_State & MODE_INSERT)
|
||||
stop_insert_mode = FALSE;
|
||||
stop_insert_mode = save_stop_insert_mode;
|
||||
#endif
|
||||
// Remove the window and frame from the tree of frames.
|
||||
(void)winframe_remove(curwin, &dummy, NULL);
|
||||
|
Reference in New Issue
Block a user