4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Invalid memory access when the VimResized autocommand changes
12 'columns' and/or 'lines'.
13 Solution: After VimResized check for changed values. (Dominique Pelle)
17 *** ../vim-7.2.121/src/screen.c Sun Feb 22 01:13:45 2009
18 --- src/screen.c Sun Feb 22 01:07:38 2009
23 static int entered = FALSE; /* avoid recursiveness */
24 static int done_outofmem_msg = FALSE; /* did outofmem message */
26 + int retry_count = 0;
31 * Allocation of the screen buffers is done only when the size changes and
32 * when Rows and Columns have been set and we have started doing full
39 apply_autocmds(EVENT_VIMRESIZED, NULL, NULL, FALSE, curbuf);
48 ! * Do not apply autocommands more than 3 times to avoid an endless loop
49 ! * in case applying autocommands always changes Rows or Columns.
51 ! if (starting == 0 && ++retry_count <= 3)
53 apply_autocmds(EVENT_VIMRESIZED, NULL, NULL, FALSE, curbuf);
54 + /* In rare cases, autocommands may have altered Rows or Columns,
55 + * jump back to check if we need to allocate the screen again. */
61 *** ../vim-7.2.121/src/version.c Sun Feb 22 02:51:37 2009
62 --- src/version.c Sun Feb 22 21:11:14 2009
66 { /* Add new patch number below this line */
72 FIXME and XXX are two common keywords used to mark broken or incomplete code
73 not only since XXX as a sex reference would grab everbodys attention but
74 simply due to the fact that Vim would highlight these words.
77 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
78 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
79 \\\ download, build and distribute -- http://www.A-A-P.org ///
80 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///