Hi 驼峰!
On Sa, 10 Mär 2012, 驼峰 wrote:
> my repro step:
> 1. run gvim
> 2. open NERDTree windows
> 3. create several tabs using 't' shortcut of NERDTree plugin
> 4. '1gt'
> 5, maximize gvim
> 6, '2gt'
> 7, restore the windows size from maximize window to normal window.
> 8, '1gt'
>
> Result: after 8th step, my gvim will crash definitely.
Bram, I think, this patch fixes it:
diff -r 94601b379f38 src/screen.c
--- a/src/screen.c Sun Mar 11 15:57:40 2012 +0100
+++ b/src/screen.c Tue Mar 13 00:05:34 2012 +0100
@@ -5371,6 +5371,9 @@
# define CHAR_CELLS 1
#endif
+ /* illegal screen size */
+ if (row > Rows)
+ row = Rows;
# ifdef FEAT_CLIPBOARD
clip_may_clear_selection(row, row);
# endif
@@ -5409,6 +5412,10 @@
}
#endif /* FEAT_RIGHTLEFT */
+ /* invalid screen access */
+ if (off_to > (unsigned) ((Rows) * Columns) || off_to < 0)
+ off_to = (unsigned) Rows * Columns;
+
redraw_next = char_needs_redraw(off_from, off_to, endcol - col);
while (col < endcol)
regards,
Christian
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php