summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0121
blob: ee442239c767f586539791942540d6fe9e558e86 (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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0121
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.0121
Problem:    Crash when using ballooneval related to 'vartabstop'.
Solution:   Initialize balloonEval->vts to NULL. (Markus Braun)
Files:	    src/ex_cmds2.c, src/gui_beval.c, src/gui_w32.c, src/gui.c


*** ../vim-8.1.0120/src/ex_cmds2.c	2018-05-12 15:36:03.000000000 +0200
--- src/ex_cmds2.c	2018-06-28 11:54:26.812645846 +0200
***************
*** 1419,1425 ****
  	    bevalexpr_due_set = FALSE;
  	    if (balloonEval == NULL)
  	    {
! 		balloonEval = (BalloonEval *)alloc(sizeof(BalloonEval));
  		balloonEvalForTerm = TRUE;
  	    }
  	    if (balloonEval != NULL)
--- 1419,1425 ----
  	    bevalexpr_due_set = FALSE;
  	    if (balloonEval == NULL)
  	    {
! 		balloonEval = (BalloonEval *)alloc_clear(sizeof(BalloonEval));
  		balloonEvalForTerm = TRUE;
  	    }
  	    if (balloonEval != NULL)
*** ../vim-8.1.0120/src/gui_beval.c	2018-06-23 19:22:45.606486311 +0200
--- src/gui_beval.c	2018-06-28 11:58:57.003085639 +0200
***************
*** 111,138 ****
  	return NULL;
      }
  
!     beval = (BalloonEval *)alloc(sizeof(BalloonEval));
      if (beval != NULL)
      {
  #ifdef FEAT_GUI_GTK
  	beval->target = GTK_WIDGET(target);
- 	beval->balloonShell = NULL;
- 	beval->timerID = 0;
  #else
  	beval->target = (Widget)target;
- 	beval->balloonShell = NULL;
- 	beval->timerID = (XtIntervalId)NULL;
  	beval->appContext = XtWidgetToApplicationContext((Widget)target);
  #endif
  	beval->showState = ShS_NEUTRAL;
- 	beval->x = 0;
- 	beval->y = 0;
  	beval->msg = mesg;
  	beval->msgCB = mesgCB;
  	beval->clientData = clientData;
- #ifdef FEAT_VARTABS
- 	beval->vts = NULL;
- #endif
  
  	/*
  	 * Set up event handler which will keep its eyes on the pointer,
--- 111,129 ----
  	return NULL;
      }
  
!     beval = (BalloonEval *)alloc_clear(sizeof(BalloonEval));
      if (beval != NULL)
      {
  #ifdef FEAT_GUI_GTK
  	beval->target = GTK_WIDGET(target);
  #else
  	beval->target = (Widget)target;
  	beval->appContext = XtWidgetToApplicationContext((Widget)target);
  #endif
  	beval->showState = ShS_NEUTRAL;
  	beval->msg = mesg;
  	beval->msgCB = mesgCB;
  	beval->clientData = clientData;
  
  	/*
  	 * Set up event handler which will keep its eyes on the pointer,
*** ../vim-8.1.0120/src/gui_w32.c	2018-06-23 19:22:45.606486311 +0200
--- src/gui_w32.c	2018-06-28 11:59:35.478867007 +0200
***************
*** 8922,8949 ****
  	return NULL;
      }
  
!     beval = (BalloonEval *)alloc(sizeof(BalloonEval));
      if (beval != NULL)
      {
  	beval->target = s_textArea;
- 	beval->balloon = NULL;
  
  	beval->showState = ShS_NEUTRAL;
- 	beval->x = 0;
- 	beval->y = 0;
  	beval->msg = mesg;
  	beval->msgCB = mesgCB;
  	beval->clientData = clientData;
- #ifdef FEAT_VARTABS
- 	beval->vts = NULL;
- #endif
  
  	InitCommonControls();
  	cur_beval = beval;
  
  	if (p_beval)
  	    gui_mch_enable_beval_area(beval);
- 
      }
      return beval;
  }
--- 8922,8942 ----
  	return NULL;
      }
  
!     beval = (BalloonEval *)alloc_clear(sizeof(BalloonEval));
      if (beval != NULL)
      {
  	beval->target = s_textArea;
  
  	beval->showState = ShS_NEUTRAL;
  	beval->msg = mesg;
  	beval->msgCB = mesgCB;
  	beval->clientData = clientData;
  
  	InitCommonControls();
  	cur_beval = beval;
  
  	if (p_beval)
  	    gui_mch_enable_beval_area(beval);
      }
      return beval;
  }
*** ../vim-8.1.0120/src/gui.c	2018-05-13 17:03:53.000000000 +0200
--- src/gui.c	2018-06-28 12:01:22.930259972 +0200
***************
*** 745,751 ****
--- 745,756 ----
  	/* Always create the Balloon Evaluation area, but disable it when
  	 * 'ballooneval' is off. */
  	if (balloonEval != NULL)
+ 	{
+ # ifdef FEAT_VARTABS
+ 	    vim_free(balloonEval->vts);
+ # endif
  	    vim_free(balloonEval);
+ 	}
  	balloonEvalForTerm = FALSE;
  # ifdef FEAT_GUI_GTK
  	balloonEval = gui_mch_create_beval_area(gui.drawarea, NULL,
*** ../vim-8.1.0120/src/version.c	2018-06-28 11:28:04.797455530 +0200
--- src/version.c	2018-06-28 12:02:15.657963770 +0200
***************
*** 791,792 ****
--- 791,794 ----
  {   /* Add new patch number below this line */
+ /**/
+     121,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
129. You cancel your newspaper subscription.

 /// 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    ///