diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-04-29 08:50:04 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-04-29 09:20:52 +0800 |
commit | 2eb1f62e29c54fe4d3cebcff388ea6c239313980 (patch) | |
tree | a5835b5edf490c3c5b046ea1769fdda5c79705a5 | |
parent | 4bcf8c15b3079ca72d6557890b50b35565fcd577 (diff) | |
download | rneovim-2eb1f62e29c54fe4d3cebcff388ea6c239313980.tar.gz rneovim-2eb1f62e29c54fe4d3cebcff388ea6c239313980.tar.bz2 rneovim-2eb1f62e29c54fe4d3cebcff388ea6c239313980.zip |
vim-patch:8.2.0672: heredoc in scripts does not accept lower case marker
Problem: Heredoc in scripts does not accept lower case marker.
Solution: Allow lower case only in non-Vim scripts. (Ken Takata,
closes vim/vim#6019)
https://github.com/vim/vim/commit/6ab0953fefe31fef91e40752a675ceb60fc2fe03
-rw-r--r-- | src/nvim/eval/vars.c | 2 | ||||
-rw-r--r-- | test/old/testdir/test_perl.vim | 5 | ||||
-rw-r--r-- | test/old/testdir/test_python2.vim | 5 | ||||
-rw-r--r-- | test/old/testdir/test_python3.vim | 5 | ||||
-rw-r--r-- | test/old/testdir/test_pyx2.vim | 5 | ||||
-rw-r--r-- | test/old/testdir/test_pyx3.vim | 5 | ||||
-rw-r--r-- | test/old/testdir/test_ruby.vim | 5 |
7 files changed, 25 insertions, 7 deletions
diff --git a/src/nvim/eval/vars.c b/src/nvim/eval/vars.c index dee3867a5a..9a653db657 100644 --- a/src/nvim/eval/vars.c +++ b/src/nvim/eval/vars.c @@ -214,7 +214,7 @@ list_T *heredoc_get(exarg_T *eap, char *cmd, bool script_get) return NULL; } *p = NUL; - if (islower((uint8_t)(*marker))) { + if (!script_get && islower((uint8_t)(*marker))) { emsg(_("E221: Marker cannot start with lower case letter")); return NULL; } diff --git a/test/old/testdir/test_perl.vim b/test/old/testdir/test_perl.vim index 5cef74193b..ce2a566f62 100644 --- a/test/old/testdir/test_perl.vim +++ b/test/old/testdir/test_perl.vim @@ -311,7 +311,10 @@ VIM::DoCommand('let s ..= "B"') perl << trim VIM::DoCommand('let s ..= "D"') . - call assert_equal('ABCD', s) + perl << trim eof + VIM::DoCommand('let s ..= "E"') + eof + call assert_equal('ABCDE', s) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/test/old/testdir/test_python2.vim b/test/old/testdir/test_python2.vim index f0259be70d..f21eb2c128 100644 --- a/test/old/testdir/test_python2.vim +++ b/test/old/testdir/test_python2.vim @@ -186,7 +186,10 @@ s+='B' python << trim s+='D' . - call assert_equal('ABCD', pyxeval('s')) + python << trim eof + s+='E' + eof + call assert_equal('ABCDE', pyxeval('s')) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/test/old/testdir/test_python3.vim b/test/old/testdir/test_python3.vim index 60773c5b2a..23c63f22d8 100644 --- a/test/old/testdir/test_python3.vim +++ b/test/old/testdir/test_python3.vim @@ -281,7 +281,10 @@ s+='B' python3 << trim s+='D' . - call assert_equal('ABCD', pyxeval('s')) + python3 << trim eof + s+='E' + eof + call assert_equal('ABCDE', pyxeval('s')) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/test/old/testdir/test_pyx2.vim b/test/old/testdir/test_pyx2.vim index c7583d0234..74f4b187f0 100644 --- a/test/old/testdir/test_pyx2.vim +++ b/test/old/testdir/test_pyx2.vim @@ -94,7 +94,10 @@ result+='B' pyx << trim result+='D' . - call assert_equal('ABCD', pyxeval('result')) + pyx << trim eof + result+='E' + eof + call assert_equal('ABCDE', pyxeval('result')) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/test/old/testdir/test_pyx3.vim b/test/old/testdir/test_pyx3.vim index a4666fe3d4..09ece6f812 100644 --- a/test/old/testdir/test_pyx3.vim +++ b/test/old/testdir/test_pyx3.vim @@ -94,7 +94,10 @@ result+='B' pyx << trim result+='D' . - call assert_equal('ABCD', pyxeval('result')) + pyx << trim eof + result+='E' + eof + call assert_equal('ABCDE', pyxeval('result')) endfunc " vim: shiftwidth=2 sts=2 expandtab diff --git a/test/old/testdir/test_ruby.vim b/test/old/testdir/test_ruby.vim index 80d39309ea..4929496086 100644 --- a/test/old/testdir/test_ruby.vim +++ b/test/old/testdir/test_ruby.vim @@ -428,7 +428,10 @@ Vim.command('let s ..= "B"') ruby << trim Vim.command('let s ..= "D"') . - call assert_equal('ABCD', s) + ruby << trim eof + Vim.command('let s ..= "E"') + eof + call assert_equal('ABCDE', s) endfunc " vim: shiftwidth=2 sts=2 expandtab |