]> git.pld-linux.org Git - packages/vim.git/blame - 7.1.227
- typo
[packages/vim.git] / 7.1.227
CommitLineData
d57b4abe
ER
1To: vim-dev@vim.org
2Subject: Patch 7.1.227
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.1.227
11Problem: Hang in syntax HL when moving over a ")". (Dominique Pelle)
12Solution: Avoid storing a syntax state in the wrong position in the list of
13 remembered states.
14Files: src/syntax.c
15
16
17*** ../vim-7.1.226/src/syntax.c Sat Jan 12 16:45:25 2008
18--- src/syntax.c Sat Jan 12 16:45:44 2008
19***************
20*** 372,378 ****
21 static int syn_stack_cleanup __ARGS((void));
22 static void syn_stack_free_entry __ARGS((buf_T *buf, synstate_T *p));
23 static synstate_T *syn_stack_find_entry __ARGS((linenr_T lnum));
24! static synstate_T *store_current_state __ARGS((synstate_T *sp));
25 static void load_current_state __ARGS((synstate_T *from));
26 static void invalidate_current_state __ARGS((void));
27 static int syn_stack_equal __ARGS((synstate_T *sp));
28--- 372,378 ----
29 static int syn_stack_cleanup __ARGS((void));
30 static void syn_stack_free_entry __ARGS((buf_T *buf, synstate_T *p));
31 static synstate_T *syn_stack_find_entry __ARGS((linenr_T lnum));
32! static synstate_T *store_current_state __ARGS((void));
33 static void load_current_state __ARGS((synstate_T *from));
34 static void invalidate_current_state __ARGS((void));
35 static int syn_stack_equal __ARGS((synstate_T *sp));
36***************
37*** 464,470 ****
38 synstate_T *p;
39 synstate_T *last_valid = NULL;
40 synstate_T *last_min_valid = NULL;
41! synstate_T *sp, *prev;
42 linenr_T parsed_lnum;
43 linenr_T first_stored;
44 int dist;
45--- 464,470 ----
46 synstate_T *p;
47 synstate_T *last_valid = NULL;
48 synstate_T *last_min_valid = NULL;
49! synstate_T *sp, *prev = NULL;
50 linenr_T parsed_lnum;
51 linenr_T first_stored;
52 int dist;
53***************
54*** 502,508 ****
55 if (!current_state_stored)
56 {
57 ++current_lnum;
58! (void)store_current_state(NULL);
59 }
60
61 /*
62--- 502,508 ----
63 if (!current_state_stored)
64 {
65 ++current_lnum;
66! (void)store_current_state();
67 }
68
69 /*
70***************
71*** 558,564 ****
72 dist = 999999;
73 else
74 dist = syn_buf->b_ml.ml_line_count / (syn_buf->b_sst_len - Rows) + 1;
75- prev = syn_stack_find_entry(current_lnum);
76 while (current_lnum < lnum)
77 {
78 syn_start_line();
79--- 558,563 ----
80***************
81*** 573,581 ****
82 * equal to the current state. If so, then validate all saved
83 * states that depended on a change before the parsed line. */
84 if (prev == NULL)
85 sp = syn_buf->b_sst_first;
86 else
87! sp = prev->sst_next;
88 if (sp != NULL
89 && sp->sst_lnum == current_lnum
90 && syn_stack_equal(sp))
91--- 572,584 ----
92 * equal to the current state. If so, then validate all saved
93 * states that depended on a change before the parsed line. */
94 if (prev == NULL)
95+ prev = syn_stack_find_entry(current_lnum - 1);
96+ if (prev == NULL)
97 sp = syn_buf->b_sst_first;
98 else
99! sp = prev;
100! while (sp != NULL && sp->sst_lnum < current_lnum)
101! sp = sp->sst_next;
102 if (sp != NULL
103 && sp->sst_lnum == current_lnum
104 && syn_stack_equal(sp))
105***************
106*** 601,607 ****
107 else if (prev == NULL
108 || current_lnum == lnum
109 || current_lnum >= prev->sst_lnum + dist)
110! prev = store_current_state(prev);
111 }
112
113 /* This can take a long time: break when CTRL-C pressed. The current
114--- 604,610 ----
115 else if (prev == NULL
116 || current_lnum == lnum
117 || current_lnum >= prev->sst_lnum + dist)
118! prev = store_current_state();
119 }
120
121 /* This can take a long time: break when CTRL-C pressed. The current
122***************
123*** 1353,1369 ****
124 * The current state must be valid for the start of the current_lnum line!
125 */
126 static synstate_T *
127! store_current_state(sp)
128! synstate_T *sp; /* at or before where state is to be saved or
129! NULL */
130 {
131 int i;
132 synstate_T *p;
133 bufstate_T *bp;
134 stateitem_T *cur_si;
135!
136! if (sp == NULL)
137! sp = syn_stack_find_entry(current_lnum);
138
139 /*
140 * If the current state contains a start or end pattern that continues
141--- 1356,1368 ----
142 * The current state must be valid for the start of the current_lnum line!
143 */
144 static synstate_T *
145! store_current_state()
146 {
147 int i;
148 synstate_T *p;
149 bufstate_T *bp;
150 stateitem_T *cur_si;
151! synstate_T *sp = syn_stack_find_entry(current_lnum);
152
153 /*
154 * If the current state contains a start or end pattern that continues
155***************
156*** 1667,1673 ****
157 * Store the current state in b_sst_array[] for later use.
158 */
159 ++current_lnum;
160! (void)store_current_state(NULL);
161 }
162 }
163
164--- 1666,1672 ----
165 * Store the current state in b_sst_array[] for later use.
166 */
167 ++current_lnum;
168! (void)store_current_state();
169 }
170 }
171
172*** ../vim-7.1.226/src/version.c Sun Jan 13 17:11:25 2008
173--- src/version.c Sun Jan 13 17:37:10 2008
174***************
175*** 668,669 ****
176--- 668,671 ----
177 { /* Add new patch number below this line */
178+ /**/
179+ 227,
180 /**/
181
182--
183Dreams are free, but there's a small charge for alterations.
184
185 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
186/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
187\\\ download, build and distribute -- http://www.A-A-P.org ///
188 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.986305 seconds and 4 git commands to generate.