mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1966: popup becomes current window after closing a terminal window
Problem: Popup becomes current window after closing a terminal window. Solution: When restoring the window after executing autocommands, check that the window ID is still the same. (Naruhiko Nishino, closes #7272)
This commit is contained in:
15
src/window.c
15
src/window.c
@@ -1460,6 +1460,21 @@ win_valid(win_T *win)
|
||||
return win_valid_popup(win);
|
||||
}
|
||||
|
||||
/*
|
||||
* Find window "id" in the current tab page.
|
||||
* Return NULL if not found.
|
||||
*/
|
||||
win_T *
|
||||
win_find_by_id(int id)
|
||||
{
|
||||
win_T *wp;
|
||||
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
if (wp->w_id == id)
|
||||
return wp;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if "win" is a pointer to an existing window in any tab page.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user