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
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1433
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.1433
Problem: Win_execute() may leave popup window focused, eventually leading
to a crash. (Bjorn Linse)
Solution: When previous window was closed, go to the first window.
Files: src/window.c, src/testdir/test_popupwin.vim
*** ../vim-8.1.1432/src/window.c 2019-05-30 17:29:34.767666654 +0200
--- src/window.c 2019-05-31 17:34:12.407650227 +0200
***************
*** 6573,6578 ****
--- 6573,6584 ----
curwin = save_curwin;
curbuf = curwin->w_buffer;
}
+ #ifdef FEAT_TEXT_PROP
+ else if (bt_popup(curwin->w_buffer))
+ // original window was closed and now we're in a popup window: Go
+ // to the first valid window.
+ win_goto(firstwin);
+ #endif
}
/*
*** ../vim-8.1.1432/src/testdir/test_popupwin.vim 2019-05-30 22:32:10.804178558 +0200
--- src/testdir/test_popupwin.vim 2019-05-31 17:33:42.747822549 +0200
***************
*** 105,110 ****
--- 105,118 ----
call delete('XtestPopup')
endfunc
+ func Test_win_execute_closing_curwin()
+ split
+ let winid = popup_create('some text', {})
+ call win_execute(winid, winnr() .. "close")
+ call assert_equal(1, winnr())
+ popupclear
+ endfunc
+
func Test_popup_with_wrap()
if !CanRunVimInTerminal()
return
*** ../vim-8.1.1432/src/version.c 2019-05-30 22:35:15.151191862 +0200
--- src/version.c 2019-05-31 17:23:30.627380604 +0200
***************
*** 769,770 ****
--- 769,772 ----
{ /* Add new patch number below this line */
+ /**/
+ 1433,
/**/
--
Time is money. Especially if you make clocks.
/// 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 ///
|