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/window.c b/src/window.c
index a967f92..3405285 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2292,7 +2292,7 @@
 }
 
 #ifdef FEAT_JOB_CHANNEL
-    static void
+    void
 leaving_window(win_T *win)
 {
     // Only matters for a prompt window.