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
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1264
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.1264
Problem: Crash when closing window from WinBar click. (Ben Jackson)
Solution: Check that window pointer is still valid. (closes #4337)
Files: src/menu.c
*** ../vim-8.1.1263/src/menu.c 2019-04-24 23:08:20.078079973 +0200
--- src/menu.c 2019-05-04 16:52:16.192216117 +0200
***************
*** 2488,2494 ****
if (col >= item->wb_startcol && col <= item->wb_endcol)
{
! win_T *save_curwin = NULL;
pos_T save_visual = VIsual;
int save_visual_active = VIsual_active;
int save_visual_select = VIsual_select;
--- 2488,2494 ----
if (col >= item->wb_startcol && col <= item->wb_endcol)
{
! win_T *save_curwin = NULL;
pos_T save_visual = VIsual;
int save_visual_active = VIsual_active;
int save_visual_select = VIsual_select;
***************
*** 2506,2514 ****
check_cursor();
}
execute_menu(NULL, item->wb_menu, -1);
! if (save_curwin != NULL)
{
curwin = save_curwin;
curbuf = curwin->w_buffer;
--- 2506,2515 ----
check_cursor();
}
+ // Note: the command might close the current window.
execute_menu(NULL, item->wb_menu, -1);
! if (save_curwin != NULL && win_valid(save_curwin))
{
curwin = save_curwin;
curbuf = curwin->w_buffer;
***************
*** 2518,2523 ****
--- 2519,2526 ----
VIsual_reselect = save_visual_reselect;
VIsual_mode = save_visual_mode;
}
+ if (!win_valid(wp))
+ break;
}
}
}
*** ../vim-8.1.1263/src/version.c 2019-05-04 16:06:08.915310869 +0200
--- src/version.c 2019-05-04 16:55:03.335008585 +0200
***************
*** 769,770 ****
--- 769,772 ----
{ /* Add new patch number below this line */
+ /**/
+ 1264,
/**/
--
User: I'm having problems with my text editor.
Help desk: Which editor are you using?
User: I don't know, but it's version VI (pronounced: 6).
Help desk: Oh, then you should upgrade to version VIM (pronounced: 994).
/// 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 ///
|