|
Karsten Hopp |
8a036e |
To: vim-dev@vim.org
|
|
Karsten Hopp |
8a036e |
Subject: Patch 7.2.446
|
|
Karsten Hopp |
8a036e |
Fcc: outbox
|
|
Karsten Hopp |
8a036e |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
8a036e |
Mime-Version: 1.0
|
|
Karsten Hopp |
8a036e |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
8a036e |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
8a036e |
------------
|
|
Karsten Hopp |
8a036e |
|
|
Karsten Hopp |
8a036e |
Patch 7.2.446
|
|
Karsten Hopp |
8a036e |
Problem: Crash in GUI when closing the last window in a tabpage. (ryo7000)
|
|
Karsten Hopp |
8a036e |
Solution: Remove the tabpage from the list before freeing the window.
|
|
Karsten Hopp |
8a036e |
Files: src/window.c
|
|
Karsten Hopp |
8a036e |
|
|
Karsten Hopp |
8a036e |
|
|
Karsten Hopp |
8a036e |
*** ../vim-7.2.445/src/window.c 2010-03-17 16:54:51.000000000 +0100
|
|
Karsten Hopp |
8a036e |
--- src/window.c 2010-07-11 13:18:31.000000000 +0200
|
|
Karsten Hopp |
8a036e |
***************
|
|
Karsten Hopp |
8a036e |
*** 2304,2309 ****
|
|
Karsten Hopp |
8a036e |
--- 2304,2310 ----
|
|
Karsten Hopp |
8a036e |
win_T *wp;
|
|
Karsten Hopp |
8a036e |
int dir;
|
|
Karsten Hopp |
8a036e |
tabpage_T *ptp = NULL;
|
|
Karsten Hopp |
8a036e |
+ int free_tp = FALSE;
|
|
Karsten Hopp |
8a036e |
|
|
Karsten Hopp |
8a036e |
/* Close the link to the buffer. */
|
|
Karsten Hopp |
8a036e |
close_buffer(win, win->w_buffer, free_buf ? DOBUF_UNLOAD : 0);
|
|
Karsten Hopp |
8a036e |
***************
|
|
Karsten Hopp |
8a036e |
*** 2321,2331 ****
|
|
Karsten Hopp |
8a036e |
if (wp == NULL)
|
|
Karsten Hopp |
8a036e |
return;
|
|
Karsten Hopp |
8a036e |
|
|
Karsten Hopp |
8a036e |
- /* Free the memory used for the window. */
|
|
Karsten Hopp |
8a036e |
- wp = win_free_mem(win, &dir, tp);
|
|
Karsten Hopp |
8a036e |
-
|
|
Karsten Hopp |
8a036e |
/* When closing the last window in a tab page remove the tab page. */
|
|
Karsten Hopp |
8a036e |
! if (wp == NULL)
|
|
Karsten Hopp |
8a036e |
{
|
|
Karsten Hopp |
8a036e |
if (tp == first_tabpage)
|
|
Karsten Hopp |
8a036e |
first_tabpage = tp->tp_next;
|
|
Karsten Hopp |
8a036e |
--- 2322,2329 ----
|
|
Karsten Hopp |
8a036e |
if (wp == NULL)
|
|
Karsten Hopp |
8a036e |
return;
|
|
Karsten Hopp |
8a036e |
|
|
Karsten Hopp |
8a036e |
/* When closing the last window in a tab page remove the tab page. */
|
|
Karsten Hopp |
8a036e |
! if (tp == NULL ? firstwin == lastwin : tp->tp_firstwin == tp->tp_lastwin)
|
|
Karsten Hopp |
8a036e |
{
|
|
Karsten Hopp |
8a036e |
if (tp == first_tabpage)
|
|
Karsten Hopp |
8a036e |
first_tabpage = tp->tp_next;
|
|
Karsten Hopp |
8a036e |
***************
|
|
Karsten Hopp |
8a036e |
*** 2341,2348 ****
|
|
Karsten Hopp |
8a036e |
}
|
|
Karsten Hopp |
8a036e |
ptp->tp_next = tp->tp_next;
|
|
Karsten Hopp |
8a036e |
}
|
|
Karsten Hopp |
8a036e |
! free_tabpage(tp);
|
|
Karsten Hopp |
8a036e |
}
|
|
Karsten Hopp |
8a036e |
}
|
|
Karsten Hopp |
8a036e |
|
|
Karsten Hopp |
8a036e |
/*
|
|
Karsten Hopp |
8a036e |
--- 2339,2352 ----
|
|
Karsten Hopp |
8a036e |
}
|
|
Karsten Hopp |
8a036e |
ptp->tp_next = tp->tp_next;
|
|
Karsten Hopp |
8a036e |
}
|
|
Karsten Hopp |
8a036e |
! free_tp = TRUE;
|
|
Karsten Hopp |
8a036e |
}
|
|
Karsten Hopp |
8a036e |
+
|
|
Karsten Hopp |
8a036e |
+ /* Free the memory used for the window. */
|
|
Karsten Hopp |
8a036e |
+ win_free_mem(win, &dir, tp);
|
|
Karsten Hopp |
8a036e |
+
|
|
Karsten Hopp |
8a036e |
+ if (free_tp)
|
|
Karsten Hopp |
8a036e |
+ free_tabpage(tp);
|
|
Karsten Hopp |
8a036e |
}
|
|
Karsten Hopp |
8a036e |
|
|
Karsten Hopp |
8a036e |
/*
|
|
Karsten Hopp |
8a036e |
*** ../vim-7.2.445/src/version.c 2010-07-07 18:20:21.000000000 +0200
|
|
Karsten Hopp |
8a036e |
--- src/version.c 2010-07-12 21:36:05.000000000 +0200
|
|
Karsten Hopp |
8a036e |
***************
|
|
Karsten Hopp |
8a036e |
*** 683,684 ****
|
|
Karsten Hopp |
8a036e |
--- 683,686 ----
|
|
Karsten Hopp |
8a036e |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
8a036e |
+ /**/
|
|
Karsten Hopp |
8a036e |
+ 446,
|
|
Karsten Hopp |
8a036e |
/**/
|
|
Karsten Hopp |
8a036e |
|
|
Karsten Hopp |
8a036e |
--
|
|
Karsten Hopp |
8a036e |
Not too long ago, compress was something you did to garbage...
|
|
Karsten Hopp |
8a036e |
|
|
Karsten Hopp |
8a036e |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
8a036e |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
8a036e |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
8a036e |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|