]> git.pld-linux.org Git - packages/vim.git/blame - 7.2.122
- allow missing runtime/syntax/* dir
[packages/vim.git] / 7.2.122
CommitLineData
78f27e33
AG
1To: vim-dev@vim.org
2Subject: Patch 7.2.122
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.2.122
11Problem: Invalid memory access when the VimResized autocommand changes
12 'columns' and/or 'lines'.
13Solution: After VimResized check for changed values. (Dominique Pelle)
14Files: src/screen.c
15
16
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
19***************
20*** 7368,7374 ****
21--- 7368,7378 ----
22 #endif
23 static int entered = FALSE; /* avoid recursiveness */
24 static int done_outofmem_msg = FALSE; /* did outofmem message */
25+ #ifdef FEAT_AUTOCMD
26+ int retry_count = 0;
27
28+ retry:
29+ #endif
30 /*
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
33***************
34*** 7643,7650 ****
35 --RedrawingDisabled;
36
37 #ifdef FEAT_AUTOCMD
38! if (starting == 0)
39 apply_autocmds(EVENT_VIMRESIZED, NULL, NULL, FALSE, curbuf);
40 #endif
41 }
42
43--- 7647,7663 ----
44 --RedrawingDisabled;
45
46 #ifdef FEAT_AUTOCMD
47! /*
48! * Do not apply autocommands more than 3 times to avoid an endless loop
49! * in case applying autocommands always changes Rows or Columns.
50! */
51! if (starting == 0 && ++retry_count <= 3)
52! {
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. */
56+ goto retry;
57+ }
58 #endif
59 }
60
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
63***************
64*** 678,679 ****
65--- 678,681 ----
66 { /* Add new patch number below this line */
67+ /**/
68+ 122,
69 /**/
70
71--
72FIXME and XXX are two common keywords used to mark broken or incomplete code
73not only since XXX as a sex reference would grab everbodys attention but
74simply due to the fact that Vim would highlight these words.
75 -- Hendrik Scholz
76
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 ///
This page took 0.038392 seconds and 4 git commands to generate.