diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-10-21 12:05:46 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-21 12:05:46 +0100 |
commit | 2435adf8eb13736e2b3d012bb70df9ef960ffd60 (patch) | |
tree | aac9e128bd75430ccfa29b9bd0c651f427d6eef7 | |
parent | 5b2a3d77d320d76f12b1666938a9d58c2a848205 (diff) |
patch 9.0.0811: error if :echowin is preceded by a command modifierv9.0.0811
Problem: Error if :echowin is preceded by a command modifier.
Solution: Do not give an error for range when there is a modifier.
(closes #11414)
-rw-r--r-- | src/testdir/test_vim9_script.vim | 4 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9compile.c | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index 6c8f1f0ce0..58e214c7b2 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -2032,6 +2032,10 @@ enddef def Test_echowindow_cmd() var local = 'local' echowindow 'something' local # comment + + # with modifier + unsilent echowin 'loud' + # output goes in message window popup_clear() enddef diff --git a/src/version.c b/src/version.c index 4017c47207..662835ebf8 100644 --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 811, +/**/ 810, /**/ 809, diff --git a/src/vim9compile.c b/src/vim9compile.c index 73bfa6c6af..fb66a78806 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -2712,8 +2712,9 @@ get_cmd_count(char_u *line, exarg_T *eap) ; if (!isdigit(*p)) { - // the command must be following - if (p < eap->cmd) + // The command or modifiers must be following. Assume a lower case + // character means there is a modifier. + if (p < eap->cmd && !vim_islower(*p)) { emsg(_(e_invalid_range)); return -1; |