diff src/structs.h @ 16800:12e3a3afdb6a v8.1.1402

patch 8.1.1402: "timer" option of popup windows not supported commit https://github.com/vim/vim/commit/51fe3b14f63da2b985bcd7b4c50fbe34ae84ea48 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 26 20:10:06 2019 +0200 patch 8.1.1402: "timer" option of popup windows not supported Problem: "timer" option of popup windows not supported. Solution: Implement the "timer" option. (Yasuhiro Matsumoto, closes https://github.com/vim/vim/issues/4439)
author Bram Moolenaar <Bram@vim.org>
date Sun, 26 May 2019 20:15:05 +0200
parents eda4d65f232c
children f5487021fdad
line wrap: on
line diff
--- a/src/structs.h
+++ b/src/structs.h
@@ -1941,6 +1941,24 @@ typedef struct {
 } syn_time_T;
 #endif
 
+typedef struct timer_S timer_T;
+struct timer_S
+{
+    long	tr_id;
+#ifdef FEAT_TIMERS
+    timer_T	*tr_next;
+    timer_T	*tr_prev;
+    proftime_T	tr_due;		    /* when the callback is to be invoked */
+    char	tr_firing;	    /* when TRUE callback is being called */
+    char	tr_paused;	    /* when TRUE callback is not invoked */
+    int		tr_repeat;	    /* number of times to repeat, -1 forever */
+    long	tr_interval;	    /* msec */
+    char_u	*tr_callback;	    /* allocated */
+    partial_T	*tr_partial;
+    int		tr_emsg_count;
+#endif
+};
+
 #ifdef FEAT_CRYPT
 /*
  * Structure to hold the type of encryption and the state of encryption or
@@ -2856,6 +2874,7 @@ struct window_S
     int		w_zindex;
     int		w_maxheight;	    // "maxheight" for popup window
     int		w_maxwidth;	    // "maxwidth" for popup window
+    timer_T	*w_popup_timer;	    // timer for closing popup window
 #endif
 
 
@@ -3434,24 +3453,6 @@ struct js_reader
 };
 typedef struct js_reader js_read_T;
 
-typedef struct timer_S timer_T;
-struct timer_S
-{
-    long	tr_id;
-#ifdef FEAT_TIMERS
-    timer_T	*tr_next;
-    timer_T	*tr_prev;
-    proftime_T	tr_due;		    /* when the callback is to be invoked */
-    char	tr_firing;	    /* when TRUE callback is being called */
-    char	tr_paused;	    /* when TRUE callback is not invoked */
-    int		tr_repeat;	    /* number of times to repeat, -1 forever */
-    long	tr_interval;	    /* msec */
-    char_u	*tr_callback;	    /* allocated */
-    partial_T	*tr_partial;
-    int		tr_emsg_count;
-#endif
-};
-
 /* Maximum number of commands from + or -c arguments. */
 #define MAX_ARG_CMDS 10