patch 9.1.1211: TabClosedPre is triggered just before the tab is being freed

Problem:  TabClosedPre is triggered just before the tab is being freed,
          which limited its functionality.
Solution: Trigger it a bit earlier and also on :tabclose and :tabonly
          (Jim Zhou)

closes: #16890

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/proto/window.pro b/src/proto/window.pro
index 9a2661d..f1e129d 100644
--- a/src/proto/window.pro
+++ b/src/proto/window.pro
@@ -102,4 +102,5 @@
 char *check_colorcolumn(char_u *cc, win_T *wp);
 int get_last_winid(void);
 int win_locked(win_T *wp);
+void trigger_tabclosedpre(tabpage_T *tp, int directly);
 /* vim: set ft=c : */