4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Crash in syntax highlighting code. (Marc Espie)
12 Solution: Prevent current_col going past the end of the line.
16 *** ../vim-6.3.084/src/syntax.c Fri Jul 1 11:20:39 2005
17 --- src/syntax.c Sun Jul 24 19:39:04 2005
21 linenr_T found_current_lnum = 0;
22 int found_current_col= 0;
23 lpos_T found_m_endpos;
24 + colnr_T prev_current_col;
27 * Clear any current state that might be hanging around.
32 /* syn_current_attr() will have skipped the check for
33 ! * an item that ends here, need to do that now. */
43 /* syn_current_attr() will have skipped the check for
44 ! * an item that ends here, need to do that now. Be
45 ! * careful not to go past the NUL. */
46 ! prev_current_col = current_col;
47 ! if (syn_getcurline()[current_col] != NUL)
50 ! current_col = prev_current_col;
57 int syncing; /* called for syncing */
60 + colnr_T prev_current_col;
62 if (!current_finished)
68 /* syn_current_attr() will have skipped the check for an item
69 ! * that ends here, need to do that now. */
79 /* syn_current_attr() will have skipped the check for an item
80 ! * that ends here, need to do that now. Be careful not to go
82 ! prev_current_col = current_col;
83 ! if (syn_getcurline()[current_col] != NUL)
86 ! current_col = prev_current_col;
95 ! if (current_state.ga_len > 0)
103 ! if (current_state.ga_len > 0
104 ! && syn_getcurline()[current_col] != NUL)
108 *** ../vim-6.3.084/src/version.c Thu Jul 21 13:49:11 2005
109 --- src/version.c Sun Jul 24 19:42:30 2005
113 { /* Add new patch number below this line */
119 BEDEVERE: How do you know so much about swallows?
120 ARTHUR: Well you have to know these things when you're a king, you know.
121 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
123 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
124 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
125 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
126 \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///