patch 9.0.1439: start Insert mode when accessing a hidden prompt buffer

Problem:    Start Insert mode when accessing a hidden prompt buffer.
Solution:   Call leaving_window() in aucmd_restbuf(). (Thorben Tröbst,
            closes #12148, closes #12147)
diff --git a/src/proto/window.pro b/src/proto/window.pro
index 6522466..d1108af 100644
--- a/src/proto/window.pro
+++ b/src/proto/window.pro
@@ -13,6 +13,7 @@
 int make_windows(int count, int vertical);
 void win_move_after(win_T *win1, win_T *win2);
 void win_equal(win_T *next_curwin, int current, int dir);
+void leaving_window(win_T *win);
 void entering_window(win_T *win);
 void curwin_init(void);
 void close_windows(buf_T *buf, int keep_curwin);