diff options
-rw-r--r-- | src/ex_docmd.c | 11 | ||||
-rw-r--r-- | src/testdir/test_vim9_expr.vim | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index a865f65d19..6cf77155ca 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3551,7 +3551,8 @@ find_ex_command( char_u *swp; if (*eap->cmd == '&' - || *eap->cmd == '$' + || (eap->cmd[0] == '$' + && eap->cmd[1] != '\'' && eap->cmd[1] != '"') || (eap->cmd[0] == '@' && (valid_yank_reg(eap->cmd[1], FALSE) || eap->cmd[1] == '@'))) @@ -3590,9 +3591,13 @@ find_ex_command( // "'string'->func()" is an expression. || *eap->cmd == '\'' // '"string"->func()' is an expression. - || (eap->cmd[0] == '0' && eap->cmd[1] == 'z') - // '"string"->func()' is an expression. || *eap->cmd == '"' + // '$"string"->func()' is an expression. + // "$'string'->func()" is an expression. + || (eap->cmd[0] == '$' + && (eap->cmd[1] == '\'' || eap->cmd[1] == '"')) + // '0z1234->func()' is an expression. + || (eap->cmd[0] == '0' && eap->cmd[1] == 'z') // "g:varname" is an expression. || eap->cmd[1] == ':' ) diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim index 5370a92326..e43eba73ab 100644 --- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -3572,7 +3572,9 @@ def Test_expr8_method_call() setline(1, ['first', 'last']) 'second'->append(1) "third"->append(2) - assert_equal(['first', 'second', 'third', 'last'], getline(1, '$')) + $"fourth"->append(3) + $'fifth'->append(4) + assert_equal(['first', 'second', 'third', 'fourth', 'fifth', 'last'], getline(1, '$')) bwipe! var bufnr = bufnr() diff --git a/src/version.c b/src/version.c index 7bdf346336..10804ecaa9 100644 --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4971, +/**/ 4970, /**/ 4969, |