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)
diff --git a/src/proto/window.pro b/src/proto/window.pro
index 24ab0ec..c10b61d 100644
--- a/src/proto/window.pro
+++ b/src/proto/window.pro
@@ -5,6 +5,7 @@
 int win_split_ins(int size, int flags, win_T *new_wp, int dir);
 int win_valid_popup(win_T *win);
 int win_valid(win_T *win);
+win_T *win_find_by_id(int id);
 int win_valid_any_tab(win_T *win);
 int win_count(void);
 int make_windows(int count, int vertical);