Mercurial > vim
comparison src/ex_docmd.c @ 77:31e555c6c691
updated for version 7.0032
author | vimboss |
---|---|
date | Thu, 06 Jan 2005 23:19:09 +0000 |
parents | 2b454a43b2c6 |
children | 60834e43d187 |
comparison
equal
deleted
inserted
replaced
76:0ef9cebc4f5d | 77:31e555c6c691 |
---|---|
1112 } | 1112 } |
1113 } | 1113 } |
1114 else | 1114 else |
1115 { | 1115 { |
1116 /* can only get here with ":endwhile" or ":endfor" */ | 1116 /* can only get here with ":endwhile" or ":endfor" */ |
1117 --cstack.cs_looplevel; | |
1118 if (cstack.cs_idx >= 0) | 1117 if (cstack.cs_idx >= 0) |
1119 --cstack.cs_idx; | 1118 rewind_conditionals(&cstack, cstack.cs_idx - 1, |
1119 CSF_WHILE | CSF_FOR, &cstack.cs_looplevel); | |
1120 } | 1120 } |
1121 } | 1121 } |
1122 | 1122 |
1123 /* | 1123 /* |
1124 * For a ":while" or ":for" we need to remember the line number. | 1124 * For a ":while" or ":for" we need to remember the line number. |
1237 /* | 1237 /* |
1238 * Reset "trylevel" in case of a ":finish" or ":return" or a missing | 1238 * Reset "trylevel" in case of a ":finish" or ":return" or a missing |
1239 * ":endtry" in a sourced file or executed function. If the try | 1239 * ":endtry" in a sourced file or executed function. If the try |
1240 * conditional is in its finally clause, ignore anything pending. | 1240 * conditional is in its finally clause, ignore anything pending. |
1241 * If it is in a catch clause, finish the caught exception. | 1241 * If it is in a catch clause, finish the caught exception. |
1242 * Also cleanup any "cs_forinfo" structures. | |
1242 */ | 1243 */ |
1243 do | 1244 do |
1244 cstack.cs_idx = cleanup_conditionals(&cstack, 0, TRUE); | 1245 { |
1245 while (--cstack.cs_idx >= 0) | 1246 int idx = cleanup_conditionals(&cstack, 0, TRUE); |
1246 ; | 1247 |
1248 if (idx == cstack.cs_idx) | |
1249 --idx; /* remove at least one */ | |
1250 rewind_conditionals(&cstack, idx, CSF_WHILE | CSF_FOR, | |
1251 &cstack.cs_looplevel); | |
1252 } | |
1253 while (cstack.cs_idx >= 0); | |
1247 trylevel = initial_trylevel; | 1254 trylevel = initial_trylevel; |
1248 } | 1255 } |
1249 | 1256 |
1250 /* If a missing ":endtry", ":endwhile", ":endfor", or ":endif" or a memory | 1257 /* If a missing ":endtry", ":endwhile", ":endfor", or ":endif" or a memory |
1251 * lack was reported above and the error message is to be converted to an | 1258 * lack was reported above and the error message is to be converted to an |