Mercurial > vim
comparison src/vim9script.c @ 28690:9a7a2908e1a8 v8.2.4869
patch 8.2.4869: expression in command block does not look after NL
Commit: https://github.com/vim/vim/commit/e442d59f6d6732c226d636067c07b7342838b36b
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 5 12:20:28 2022 +0100
patch 8.2.4869: expression in command block does not look after NL
Problem: Expression in command block does not look after NL.
Solution: Skip over NL to check what follows. (closes https://github.com/vim/vim/issues/10358)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 05 May 2022 13:30:05 +0200 |
parents | daf785caecf2 |
children | 99a7eb1881c7 |
comparison
equal
deleted
inserted
replaced
28689:0c6c580c01b4 | 28690:9a7a2908e1a8 |
---|---|
587 if (STRNCMP("as", nextarg, 2) == 0 && IS_WHITE_OR_NUL(nextarg[2])) | 587 if (STRNCMP("as", nextarg, 2) == 0 && IS_WHITE_OR_NUL(nextarg[2])) |
588 { | 588 { |
589 char_u *p; | 589 char_u *p; |
590 | 590 |
591 if (getnext) | 591 if (getnext) |
592 arg = eval_next_line(evalarg); | 592 arg = eval_next_line(expr_end, evalarg); |
593 else | 593 else |
594 arg = nextarg; | 594 arg = nextarg; |
595 | 595 |
596 // Skip over "as Name "; no line break allowed after "as". | 596 // Skip over "as Name "; no line break allowed after "as". |
597 // Do not allow for ':' and '#'. | 597 // Do not allow for ':' and '#'. |