# HG changeset patch # User Bram Moolenaar # Date 1666350903 -7200 # Node ID 3e8aed429cc5a742f39cb1c00a8f981950304d7e # Parent e0b47ccd75a4d21fa187ed098719a8a5a6fc7c3e patch 9.0.0811: error if :echowin is preceded by a command modifier Commit: https://github.com/vim/vim/commit/2435adf8eb13736e2b3d012bb70df9ef960ffd60 Author: Bram Moolenaar Date: Fri Oct 21 12:05:46 2022 +0100 patch 9.0.0811: error if :echowin is preceded by a command modifier 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) diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim --- 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 --- 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 --- 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;