diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-20 17:35:49 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-20 17:35:49 +0000 |
commit | 21f0d6cbca9c93e2319d45a33ba26b10a85ff4dc (patch) | |
tree | 3015c586b20581bd659e909b145cfc282f1caaf1 | |
parent | 4ede01f18884961f2e008880b4964e5d61ea5c36 (diff) |
patch 8.2.4161: Vim9: warning for missing white space after imported variablev8.2.4161
Problem: Vim9: warning for missing white space after imported variable.
Solution: Do not skip white space. (closes #9567)
-rw-r--r-- | src/testdir/test_vim9_import.vim | 8 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9expr.c | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/testdir/test_vim9_import.vim b/src/testdir/test_vim9_import.vim index 49ff165087..6a38106a7d 100644 --- a/src/testdir/test_vim9_import.vim +++ b/src/testdir/test_vim9_import.vim @@ -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' @@ -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')) @@ -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 diff --git a/src/version.c b/src/version.c index 901d671a5a..fae00dc9d3 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4161, +/**/ 4160, /**/ 4159, diff --git a/src/vim9expr.c b/src/vim9expr.c index 7cc3078078..d5bb276b7d 100644 --- a/src/vim9expr.c +++ b/src/vim9expr.c @@ -321,7 +321,6 @@ compile_load_scriptvar( cctx, TRUE); } *p = cc; - p = skipwhite(p); *end = p; if (done) return res; |