summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.3.528
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2012-09-26 01:10:42 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:51:55 +0200
commit9664bee729d487bcc0a0bc35859f8e13d5421c75 (patch)
treeb428a16618e36ed864a8d76ea3435e19a452bf90 /source/ap/vim/patches/7.3.528
parent75a4a592e5ccda30715f93563d741b83e0dcf39e (diff)
downloadcurrent-slackware-14.0.tar.gz
current-slackware-14.0.tar.xz
Slackware 14.0slackware-14.0
Wed Sep 26 01:10:42 UTC 2012 Slackware 14.0 x86_64 stable is released! We're perfectionists here at Slackware, so this release has been a long time a-brewing. But we think you'll agree that it was worth the wait. Slackware 14.0 combines modern components, ease of use, and flexible configuration... our "KISS" philosophy demands it. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Thanks to everyone who helped make this happen. The Slackware team, the upstream developers, and (of course) the awesome Slackware user community. Have fun! :-)
Diffstat (limited to 'source/ap/vim/patches/7.3.528')
-rw-r--r--source/ap/vim/patches/7.3.528171
1 files changed, 171 insertions, 0 deletions
diff --git a/source/ap/vim/patches/7.3.528 b/source/ap/vim/patches/7.3.528
new file mode 100644
index 000000000..41084ad4f
--- /dev/null
+++ b/source/ap/vim/patches/7.3.528
@@ -0,0 +1,171 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 7.3.528
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.3.528
+Problem: Crash when closing last window in a tab. (Alex Efros)
+Solution: Use common code in close_last_window_tabpage(). (Christian
+ Brabandt)
+Files: src/window.c
+
+
+*** ../vim-7.3.527/src/window.c 2012-03-16 19:07:54.000000000 +0100
+--- src/window.c 2012-05-25 12:25:16.000000000 +0200
+***************
+*** 23,28 ****
+--- 23,29 ----
+ static void win_totop __ARGS((int size, int flags));
+ static void win_equal_rec __ARGS((win_T *next_curwin, int current, frame_T *topfr, int dir, int col, int row, int width, int height));
+ static int last_window __ARGS((void));
++ static int close_last_window_tabpage __ARGS((win_T *win, int free_buf, tabpage_T *prev_curtab));
+ static win_T *win_free_mem __ARGS((win_T *win, int *dirp, tabpage_T *tp));
+ static frame_T *win_altframe __ARGS((win_T *win, tabpage_T *tp));
+ static tabpage_T *alt_tabpage __ARGS((void));
+***************
+*** 2105,2110 ****
+--- 2106,2147 ----
+ }
+
+ /*
++ * Close the possibly last window in a tab page.
++ * Returns TRUE when the window was closed already.
++ */
++ static int
++ close_last_window_tabpage(win, free_buf, prev_curtab)
++ win_T *win;
++ int free_buf;
++ tabpage_T *prev_curtab;
++ {
++ if (firstwin == lastwin)
++ {
++ /*
++ * Closing the last window in a tab page. First go to another tab
++ * page and then close the window and the tab page. This avoids that
++ * curwin and curtab are invalid while we are freeing memory, they may
++ * be used in GUI events.
++ */
++ goto_tabpage_tp(alt_tabpage());
++ redraw_tabline = TRUE;
++
++ /* Safety check: Autocommands may have closed the window when jumping
++ * to the other tab page. */
++ if (valid_tabpage(prev_curtab) && prev_curtab->tp_firstwin == win)
++ {
++ int h = tabline_height();
++
++ win_close_othertab(win, free_buf, prev_curtab);
++ if (h != tabline_height())
++ shell_new_rows();
++ }
++ return TRUE;
++ }
++ return FALSE;
++ }
++
++ /*
+ * Close window "win". Only works for the current tab page.
+ * If "free_buf" is TRUE related buffer may be unloaded.
+ *
+***************
+*** 2143,2171 ****
+ }
+ #endif
+
+! /*
+! * When closing the last window in a tab page first go to another tab
+! * page and then close the window and the tab page. This avoids that
+! * curwin and curtab are not invalid while we are freeing memory, they may
+! * be used in GUI events.
+! */
+! if (firstwin == lastwin)
+! {
+! goto_tabpage_tp(alt_tabpage());
+! redraw_tabline = TRUE;
+!
+! /* Safety check: Autocommands may have closed the window when jumping
+! * to the other tab page. */
+! if (valid_tabpage(prev_curtab) && prev_curtab->tp_firstwin == win)
+! {
+! int h = tabline_height();
+!
+! win_close_othertab(win, free_buf, prev_curtab);
+! if (h != tabline_height())
+! shell_new_rows();
+! }
+! return;
+! }
+
+ /* When closing the help window, try restoring a snapshot after closing
+ * the window. Otherwise clear the snapshot, it's now invalid. */
+--- 2180,2190 ----
+ }
+ #endif
+
+! /* When closing the last window in a tab page first go to another tab page
+! * and then close the window and the tab page to avoid that curwin and
+! * curtab are invalid while we are freeing memory. */
+! if (close_last_window_tabpage(win, free_buf, prev_curtab))
+! return;
+
+ /* When closing the help window, try restoring a snapshot after closing
+ * the window. Otherwise clear the snapshot, it's now invalid. */
+***************
+*** 2225,2231 ****
+
+ /* Autocommands may have closed the window already, or closed the only
+ * other window or moved to another tab page. */
+! if (!win_valid(win) || last_window() || curtab != prev_curtab)
+ return;
+
+ /* Free the memory used for the window and get the window that received
+--- 2244,2251 ----
+
+ /* Autocommands may have closed the window already, or closed the only
+ * other window or moved to another tab page. */
+! if (!win_valid(win) || last_window() || curtab != prev_curtab
+! || close_last_window_tabpage(win, free_buf, prev_curtab))
+ return;
+
+ /* Free the memory used for the window and get the window that received
+***************
+*** 2310,2316 ****
+
+ /*
+ * Close window "win" in tab page "tp", which is not the current tab page.
+! * This may be the last window ih that tab page and result in closing the tab,
+ * thus "tp" may become invalid!
+ * Caller must check if buffer is hidden and whether the tabline needs to be
+ * updated.
+--- 2330,2336 ----
+
+ /*
+ * Close window "win" in tab page "tp", which is not the current tab page.
+! * This may be the last window in that tab page and result in closing the tab,
+ * thus "tp" may become invalid!
+ * Caller must check if buffer is hidden and whether the tabline needs to be
+ * updated.
+*** ../vim-7.3.527/src/version.c 2012-05-25 11:56:06.000000000 +0200
+--- src/version.c 2012-05-25 12:38:25.000000000 +0200
+***************
+*** 716,717 ****
+--- 716,719 ----
+ { /* Add new patch number below this line */
++ /**/
++ 528,
+ /**/
+
+--
+For society, it's probably a good thing that engineers value function over
+appearance. For example, you wouldn't want engineers to build nuclear power
+plants that only _look_ like they would keep all the radiation inside.
+ (Scott Adams - The Dilbert principle)
+
+ /// 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 ///