4 From: Bram Moolenaar <Bram@moolenaar.net>
8 Problem: Crash when a WinLeave autocommand deletes the buffer in the other
10 Solution: Check that after executing the WinLeave autocommands there still
11 is a window to be closed. Also update the test that was supposed
12 to check for this problem.
13 Files: src/window.c, testdir/test13.in, testdir/test13.ok
16 *** ../vim-5.7.22/src/window.c Tue Jan 25 10:47:16 2000
17 --- src/window.c Thu Jan 18 13:41:47 2001
22 apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);
23 ! if (!win_valid(win))
26 apply_autocmds(EVENT_WINLEAVE, NULL, NULL, FALSE, curbuf);
27 ! if (!win_valid(win))
34 apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);
35 ! if (!win_valid(win) || firstwin == lastwin)
38 apply_autocmds(EVENT_WINLEAVE, NULL, NULL, FALSE, curbuf);
39 ! if (!win_valid(win) || firstwin == lastwin)
46 close_buffer(win, win->w_buffer, free_buf, FALSE);
47 /* autocommands may have closed the window already */
48 ! if (!win_valid(win))
51 win_new_height(wp, wp->w_height + win->w_height + win->w_status_height);
54 close_buffer(win, win->w_buffer, free_buf, FALSE);
55 /* autocommands may have closed the window already */
56 ! if (!win_valid(win) || firstwin == lastwin)
59 win_new_height(wp, wp->w_height + win->w_height + win->w_status_height);
60 *** ../vim-5.7.22/src/testdir/test13.in Tue Jul 20 13:31:27 1999
61 --- src/testdir/test13.in Thu Jan 18 12:59:41 2001
67 ! :au WinLeave testje bdel
70 ! :au WinLeave testje bdel testje3
78 ! :au WinLeave Xtestje2 bdel
81 ! :au WinLeave Xtestje1 bdel Xtestje3
85 *** ../vim-5.7.22/src/testdir/test13.ok Tue Jul 20 13:35:40 1999
86 --- src/testdir/test13.ok Thu Jan 18 13:56:54 2001
104 *** ../vim-5.7.22/src/version.c Mon Jan 8 11:50:35 2001
105 --- src/version.c Thu Jan 18 13:54:38 2001
109 { /* Add new patch number below this line */
115 ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
116 KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T
117 HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
118 LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER),
120 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
122 /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\
123 ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
124 \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///