File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3274,10 +3274,10 @@ find_ex_command(
32743274 if (lookup != NULL )
32753275 {
32763276 // Skip over first char for "&opt = val", "$ENV = val" and "@r = val".
3277- char_u * pskip = (* eap -> cmd == '&' || * eap -> cmd == '$'
3278- || * eap -> cmd == '@' ) ? eap -> cmd + 1 : eap -> cmd ;
3277+ char_u * pskip = (* eap -> cmd == '&' || * eap -> cmd == '$' )
3278+ ? eap -> cmd + 1 : eap -> cmd ;
32793279
3280- if (vim_strchr ((char_u * )"{('[\"" , * p ) != NULL
3280+ if (vim_strchr ((char_u * )"{('[\"@ " , * p ) != NULL
32813281 || ((p = to_name_const_end (pskip )) > eap -> cmd && * p != NUL ))
32823282 {
32833283 int oplen ;
@@ -3336,6 +3336,8 @@ find_ex_command(
33363336 // Recognize an assignment if we recognize the variable name:
33373337 // "g:var = expr"
33383338 // "var = expr" where "var" is a local var name.
3339+ if (* eap -> cmd == '@' )
3340+ p = eap -> cmd + 2 ;
33393341 oplen = assignment_len (skipwhite (p ), & heredoc );
33403342 if (oplen > 0 )
33413343 {
Original file line number Diff line number Diff line change @@ -423,6 +423,23 @@ def Test_assignment_vim9script()
423423 let ll =
424424 Func ()
425425 assert_equal ([1 , 2 ], ll )
426+
427+ @/ = ' text'
428+ assert_equal (' text' , @/ )
429+ @0 = ' zero'
430+ assert_equal (' zero' , @0 )
431+ @1 = ' one'
432+ assert_equal (' one' , @1 )
433+ @9 = ' nine'
434+ assert_equal (' nine' , @9 )
435+ @- = ' minus'
436+ assert_equal (' minus' , @- )
437+ if has (' clipboard_working' )
438+ @* = ' star'
439+ assert_equal (' star' , @* )
440+ @+ = ' plus'
441+ assert_equal (' plus' , @+ )
442+ endif
426443 END
427444 CheckScriptSuccess (lines )
428445enddef
Original file line number Diff line number Diff line change @@ -754,6 +754,8 @@ static char *(features[]) =
754754
755755static int included_patches [] =
756756{ /* Add new patch number below this line */
757+ /**/
758+ 1359 ,
757759/**/
758760 1358 ,
759761/**/
You can’t perform that action at this time.
0 commit comments