Skip to content

Commit

Permalink
patch 8.2.4161: Vim9: warning for missing white space after imported …
Browse files Browse the repository at this point in the history
…variable

Problem:    Vim9: warning for missing white space after imported variable.
Solution:   Do not skip white space. (closes #9567)
  • Loading branch information
brammool committed Jan 20, 2022
1 parent 4ede01f commit 21f0d6c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/testdir/test_vim9_import.vim
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ def Test_vim9_import_export()
enddef
g:funcref_result = GetExported()

def GetName(): string
return expo.exp_name .. 'son'
enddef
g:long_name = GetName()

g:imported_name = expo.exp_name
expo.exp_name ..= ' Doe'
expo.exp_name = expo.exp_name .. ' Maar'
Expand Down Expand Up @@ -98,6 +103,7 @@ def Test_vim9_import_export()
assert_equal('Exported', g:imported_func)
assert_equal('Exported', g:funcref_result)
assert_equal('John', g:imported_name)
assert_equal('Johnson', g:long_name)
assert_equal('John Doe Maar', g:imported_name_appended)
assert_false(exists('g:name'))

Expand All @@ -109,7 +115,7 @@ def Test_vim9_import_export()
unlet g:exported_i2
unlet g:exported_later
unlet g:imported_func
unlet g:imported_name g:imported_name_appended
unlet g:imported_name g:long_name g:imported_name_appended
delete('Ximport.vim')

# similar, with line breaks
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4161,
/**/
4160,
/**/
Expand Down
1 change: 0 additions & 1 deletion src/vim9expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ compile_load_scriptvar(
cctx, TRUE);
}
*p = cc;
p = skipwhite(p);
*end = p;
if (done)
return res;
Expand Down

0 comments on commit 21f0d6c

Please sign in to comment.