patch 9.1.1305: completion menu active after switching windows/tabs

Problem:  When switching to another window or tab page while the
          completion menu is active, the menu stays visible, although it
          belongs to the previous window/tab page context (Evgeni
          Chasnovski).
Solution: Track the window and tab page where completion started. Detect
          changes in the main editing loop and cancel completion mode if
          the current window or tab page differs from where completion
          started.

fixes: #17090
closes: #17101

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/proto/insexpand.pro b/src/proto/insexpand.pro
index a9ca289..8529b7b 100644
--- a/src/proto/insexpand.pro
+++ b/src/proto/insexpand.pro
@@ -66,4 +66,5 @@
 void ins_compl_check_keys(int frequency, int in_compl_func);
 int ins_complete(int c, int enable_pum);
 void free_insexpand_stuff(void);
+int ins_compl_cancel(void);
 /* vim: set ft=c : */