Mercurial > vim
comparison src/vim9compile.c @ 25551:5ab75ca75d21 v8.2.3312
patch 8.2.3312: Vim9: after "if false" line breaks in expression not skipped
Commit: https://github.com/vim/vim/commit/e525bdda3aa29f0ffcb18d8d16903ebafc2b5881
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 7 18:12:40 2021 +0200
patch 8.2.3312: Vim9: after "if false" line breaks in expression not skipped
Problem: Vim9: after "if false" line breaks in expression not skipped.
Solution: Do parse the expression. (closes https://github.com/vim/vim/issues/8723)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 07 Aug 2021 18:15:03 +0200 |
parents | ec4df0b982da |
children | 446f478d6fb1 |
comparison
equal
deleted
inserted
replaced
25550:6934c5328627 | 25551:5ab75ca75d21 |
---|---|
9728 ea.cmdidx = CMD_legacy; | 9728 ea.cmdidx = CMD_legacy; |
9729 } | 9729 } |
9730 | 9730 |
9731 if (p == ea.cmd && ea.cmdidx != CMD_SIZE) | 9731 if (p == ea.cmd && ea.cmdidx != CMD_SIZE) |
9732 { | 9732 { |
9733 if (cctx.ctx_skip == SKIP_YES) | 9733 if (cctx.ctx_skip == SKIP_YES && ea.cmdidx != CMD_eval) |
9734 { | 9734 { |
9735 line += STRLEN(line); | 9735 line += STRLEN(line); |
9736 goto nextline; | 9736 goto nextline; |
9737 } | 9737 } |
9738 | 9738 else if (ea.cmdidx != CMD_eval) |
9739 // Expression or function call. | |
9740 if (ea.cmdidx != CMD_eval) | |
9741 { | 9739 { |
9742 // CMD_var cannot happen, compile_assignment() above would be | 9740 // CMD_var cannot happen, compile_assignment() above would be |
9743 // used. Most likely an assignment to a non-existing variable. | 9741 // used. Most likely an assignment to a non-existing variable. |
9744 semsg(_(e_command_not_recognized_str), ea.cmd); | 9742 semsg(_(e_command_not_recognized_str), ea.cmd); |
9745 goto erret; | 9743 goto erret; |