Mercurial > vim
comparison src/ex_eval.c @ 114:f6e567606d47
updated for version 7.0041
author | vimboss |
---|---|
date | Mon, 17 Jan 2005 22:16:15 +0000 |
parents | e918d3e340a4 |
children | 2463194c8cdd |
comparison
equal
deleted
inserted
replaced
113:3ab5fe5c1bb0 | 114:f6e567606d47 |
---|---|
1170 else | 1170 else |
1171 { | 1171 { |
1172 fl = cstack->cs_flags[cstack->cs_idx]; | 1172 fl = cstack->cs_flags[cstack->cs_idx]; |
1173 if (!(fl & csf)) | 1173 if (!(fl & csf)) |
1174 { | 1174 { |
1175 /* If we are in a ":while" or ":for" but used the wrong endloop | |
1176 * command, do not rewind to the next enclosing ":for"/":while". */ | |
1175 if (fl & CSF_WHILE) | 1177 if (fl & CSF_WHILE) |
1176 eap->errmsg = (char_u *)_("E999: Using :endfor with :while"); | 1178 eap->errmsg = (char_u *)_("E732: Using :endfor with :while"); |
1177 else if (fl & CSF_FOR) | 1179 else if (fl & CSF_FOR) |
1178 eap->errmsg = (char_u *)_("E999: Using :endwhile with :for"); | 1180 eap->errmsg = (char_u *)_("E733: Using :endwhile with :for"); |
1179 else if (!(fl & CSF_TRY)) | 1181 } |
1182 if (!(fl & (CSF_WHILE | CSF_FOR))) | |
1183 { | |
1184 if (!(fl & CSF_TRY)) | |
1180 eap->errmsg = e_endif; | 1185 eap->errmsg = e_endif; |
1181 else if (fl & CSF_FINALLY) | 1186 else if (fl & CSF_FINALLY) |
1182 eap->errmsg = e_endtry; | 1187 eap->errmsg = e_endtry; |
1183 /* Try to find the matching ":while" and report what's missing. */ | 1188 /* Try to find the matching ":while" and report what's missing. */ |
1184 for (idx = cstack->cs_idx; idx > 0; --idx) | 1189 for (idx = cstack->cs_idx; idx > 0; --idx) |