diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-09-14 14:43:25 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-09-14 14:43:25 +0200 |
commit | a971b82b160aca28cff7e318d4553df5349b5103 (patch) | |
tree | 3fb27e26538bc4ea9cb3671fd763dce2e6183f00 /src/term.c | |
parent | 52af96527c914599334e3c2543ebb5ba1e37bbbe (diff) | |
download | vim-git-a971b82b160aca28cff7e318d4553df5349b5103.tar.gz |
updated for version 7.3.306v7.3.306
Problem: When closing a window there is a chance that deleting a scrollbar
triggers a GUI resize, which uses the window while it is not in a
valid state.
Solution: Set the buffer pointer to NULL to be able to detect the invalid
situation. Fix a few places that used the buffer pointer
incorrectly.
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/term.c b/src/term.c index 77387e099..7798480ea 100644 --- a/src/term.c +++ b/src/term.c @@ -3017,12 +3017,20 @@ set_shellsize(width, height, mustset) if (width < 0 || height < 0) /* just checking... */ return; - if (State == HITRETURN || State == SETWSIZE) /* postpone the resizing */ + if (State == HITRETURN || State == SETWSIZE) { + /* postpone the resizing */ State = SETWSIZE; return; } + /* curwin->w_buffer can be NULL when we are closing a window and the + * buffer has already been closed and removing a scrollbar causes a resize + * event. Don't resize then, it will happen after entering another buffer. + */ + if (curwin->w_buffer == NULL) + return; + ++busy; #ifdef AMIGA |