Mercurial > vim
comparison src/ex_docmd.c @ 33193:256febd1cbf0 v9.0.1876
patch 9.0.1876: Vim9: parsing commands with newlines wrong
Commit: https://github.com/vim/vim/commit/00cb247465856eaa546c520b65cf0ccc753ee1cd
Author: Christian Brabandt <cb@256bit.org>
Date: Tue Sep 5 20:46:25 2023 +0200
patch 9.0.1876: Vim9: parsing commands with newlines wrong
Problem: Vim9: parsing commands with newlines wrong
Solution: Accept a '\n' for parsing lists and command arguments
closes: #13015
closes: #13020
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 05 Sep 2023 21:00:03 +0200 |
parents | b2c506f480c7 |
children | 46d449fd4fe4 |
comparison
equal
deleted
inserted
replaced
33192:efd072489401 | 33193:256febd1cbf0 |
---|---|
3952 eap->cmdidx = CMD_finally; | 3952 eap->cmdidx = CMD_finally; |
3953 | 3953 |
3954 #ifdef FEAT_EVAL | 3954 #ifdef FEAT_EVAL |
3955 if (eap->cmdidx < CMD_SIZE | 3955 if (eap->cmdidx < CMD_SIZE |
3956 && vim9 | 3956 && vim9 |
3957 && !IS_WHITE_OR_NUL(*p) && *p != '\n' && *p != '!' && *p != '|' | 3957 && !IS_WHITE_NL_OR_NUL(*p) && *p != '!' && *p != '|' |
3958 && (eap->cmdidx < 0 || | 3958 && (eap->cmdidx < 0 || |
3959 (cmdnames[eap->cmdidx].cmd_argt & EX_NONWHITE_OK) == 0)) | 3959 (cmdnames[eap->cmdidx].cmd_argt & EX_NONWHITE_OK) == 0)) |
3960 { | 3960 { |
3961 char_u *cmd = vim_strnsave(eap->cmd, p - eap->cmd); | 3961 char_u *cmd = vim_strnsave(eap->cmd, p - eap->cmd); |
3962 | 3962 |