summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1403
blob: cd8018dd27c88159911869430234e57d4b1eb4d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1403
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.1403
Problem:    Cannot build without the timer feature.
Solution:   Add #ifdef.
Files:	    src/structs.h, src/window.c, src/popupwin.c,
            src/testdir/test_popupwin.vim


*** ../vim-8.1.1402/src/structs.h	2019-05-26 20:10:02.604276366 +0200
--- src/structs.h	2019-05-26 20:37:16.352032625 +0200
***************
*** 2874,2880 ****
--- 2874,2882 ----
      int		w_zindex;
      int		w_maxheight;	    // "maxheight" for popup window
      int		w_maxwidth;	    // "maxwidth" for popup window
+ # if defined(FEAT_TIMERS)
      timer_T	*w_popup_timer;	    // timer for closing popup window
+ # endif
  #endif
  
  
*** ../vim-8.1.1402/src/window.c	2019-05-26 20:10:02.604276366 +0200
--- src/window.c	2019-05-26 20:38:09.435769462 +0200
***************
*** 4859,4864 ****
--- 4859,4865 ----
      return wp == aucmd_win || bt_popup(wp->w_buffer);
  }
  
+ #if defined(FEAT_TEXT_PROP) || defined(PROTO)
  /*
   * Free a popup window.  This does not take the window out of the window list
   * and assumes there is only one toplevel frame, no split.
***************
*** 4867,4877 ****
--- 4868,4881 ----
  win_free_popup(win_T *win)
  {
      win_close_buffer(win, TRUE, FALSE);
+ # if defined(FEAT_TIMERS)
      if (win->w_popup_timer != NULL)
  	stop_timer(win->w_popup_timer);
+ # endif
      vim_free(win->w_frame);
      win_free(win, NULL);
  }
+ #endif
  
  /*
   * Append window "wp" in the window list after window "after".
*** ../vim-8.1.1402/src/popupwin.c	2019-05-26 20:10:02.604276366 +0200
--- src/popupwin.c	2019-05-26 20:43:32.806147513 +0200
***************
*** 30,35 ****
--- 30,36 ----
      wp->w_wincol = dict_get_number(dict, (char_u *)"col");
      wp->w_zindex = dict_get_number(dict, (char_u *)"zindex");
  
+ #if defined(FEAT_TIMERS)
      // Add timer to close the popup after some time.
      nr = dict_get_number(dict, (char_u *)"time");
      if (nr > 0)
***************
*** 49,54 ****
--- 50,56 ----
  	    wp->w_popup_timer->tr_partial = tv.vval.v_partial;
  	}
      }
+ #endif
  
  }
  
*** ../vim-8.1.1402/src/testdir/test_popupwin.vim	2019-05-26 20:10:02.604276366 +0200
--- src/testdir/test_popupwin.vim	2019-05-26 20:42:03.266599309 +0200
***************
*** 39,44 ****
--- 39,47 ----
  endfunc
  
  func Test_popup_time()
+   if !has('timers')
+     return
+   endif
    topleft vnew
    call setline(1, 'hello')
  
***************
*** 52,57 ****
--- 55,61 ----
    call assert_equal('world', line)
  
    sleep 700m
+   redraw
    let line = join(map(range(1, 5), 'screenstring(1, v:val)'), '')
    call assert_equal('hello', line)
  
*** ../vim-8.1.1402/src/version.c	2019-05-26 20:10:02.604276366 +0200
--- src/version.c	2019-05-26 20:34:08.880951767 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1403,
  /**/

-- 
To define recursion, we must first define recursion.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///