From f4b355df1a34db13f2a7e9f58f97729e7607d296 Mon Sep 17 00:00:00 2001 From: edyfox Date: Fri, 27 Apr 2007 03:07:54 +0000 Subject: [PATCH] Patch 7.0.227 Problem: Crash when closing a window in the GUI. (Charles Campbell) Solution: Don't call out_flush() from win_free(). Files: src/window.c git-svn-id: https://vim.svn.sourceforge.net/svnroot/vim/vim7@245 2a77ed30-b011-0410-a7ad-c7884a0aa172 --- src/version.c | 2 ++ src/window.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/version.c b/src/version.c index f19fbbaa..dc85d40a 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 227, +/**/ 226, /**/ 225, diff --git a/src/window.c b/src/window.c index 40aa2f06..28b9660b 100644 --- a/src/window.c +++ b/src/window.c @@ -2084,6 +2084,13 @@ win_close(win, free_buf) } #endif +#ifdef FEAT_GUI + /* Avoid trouble with scrollbars that are going to be deleted in + * win_free(). */ + if (gui.in_use) + out_flush(); +#endif + /* * Close the link to the buffer. */ @@ -4174,7 +4181,6 @@ win_free(wp, tp) #ifdef FEAT_GUI if (gui.in_use) { - out_flush(); gui_mch_destroy_scrollbar(&wp->w_scrollbars[SBAR_LEFT]); gui_mch_destroy_scrollbar(&wp->w_scrollbars[SBAR_RIGHT]); } -- 2.11.4.GIT