summaryrefslogtreecommitdiff
path: root/src/ex_eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-01-17 22:16:15 +0000
committerBram Moolenaar <Bram@vim.org>2005-01-17 22:16:15 +0000
commit3a3a72348d1de85043b1be4dee14c11a24d26add (patch)
tree49b228aa3ba957c2a8cafcb77480c66927985937 /src/ex_eval.c
parentf3bae6935a55ddef3a7a7636596f454ddfd821cf (diff)
downloadvim-git-3a3a72348d1de85043b1be4dee14c11a24d26add.tar.gz
updated for version 7.0041
Diffstat (limited to 'src/ex_eval.c')
-rw-r--r--src/ex_eval.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ex_eval.c b/src/ex_eval.c
index 38517e3e7..6acf9de7d 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -1172,11 +1172,16 @@ ex_endwhile(eap)
fl = cstack->cs_flags[cstack->cs_idx];
if (!(fl & csf))
{
+ /* If we are in a ":while" or ":for" but used the wrong endloop
+ * command, do not rewind to the next enclosing ":for"/":while". */
if (fl & CSF_WHILE)
- eap->errmsg = (char_u *)_("E999: Using :endfor with :while");
+ eap->errmsg = (char_u *)_("E732: Using :endfor with :while");
else if (fl & CSF_FOR)
- eap->errmsg = (char_u *)_("E999: Using :endwhile with :for");
- else if (!(fl & CSF_TRY))
+ eap->errmsg = (char_u *)_("E733: Using :endwhile with :for");
+ }
+ if (!(fl & (CSF_WHILE | CSF_FOR)))
+ {
+ if (!(fl & CSF_TRY))
eap->errmsg = e_endif;
else if (fl & CSF_FINALLY)
eap->errmsg = e_endtry;