mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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 #6019)
This commit is contained in:
@@ -595,7 +595,7 @@ heredoc_get(exarg_T *eap, char_u *cmd, int script_get)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
*p = NUL;
|
*p = NUL;
|
||||||
if (vim_islower(*marker))
|
if (!script_get && vim_islower(*marker))
|
||||||
{
|
{
|
||||||
emsg(_("E221: Marker cannot start with lower case letter"));
|
emsg(_("E221: Marker cannot start with lower case letter"));
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -623,7 +623,10 @@ vim.command('let s ..= "B"')
|
|||||||
lua << trim
|
lua << trim
|
||||||
vim.command('let s ..= "D"')
|
vim.command('let s ..= "D"')
|
||||||
.
|
.
|
||||||
call assert_equal('ABCD', s)
|
lua << trim eof
|
||||||
|
vim.command('let s ..= "E"')
|
||||||
|
eof
|
||||||
|
call assert_equal('ABCDE', s)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -305,7 +305,10 @@ VIM::DoCommand('let s ..= "B"')
|
|||||||
perl << trim
|
perl << trim
|
||||||
VIM::DoCommand('let s ..= "D"')
|
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
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -182,7 +182,10 @@ s+='B'
|
|||||||
python << trim
|
python << trim
|
||||||
s+='D'
|
s+='D'
|
||||||
.
|
.
|
||||||
call assert_equal('ABCD', pyxeval('s'))
|
python << trim eof
|
||||||
|
s+='E'
|
||||||
|
eof
|
||||||
|
call assert_equal('ABCDE', pyxeval('s'))
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -349,7 +349,10 @@ s+='B'
|
|||||||
python3 << trim
|
python3 << trim
|
||||||
s+='D'
|
s+='D'
|
||||||
.
|
.
|
||||||
call assert_equal('ABCD', pyxeval('s'))
|
python3 << trim eof
|
||||||
|
s+='E'
|
||||||
|
eof
|
||||||
|
call assert_equal('ABCDE', pyxeval('s'))
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -94,7 +94,10 @@ result+='B'
|
|||||||
pyx << trim
|
pyx << trim
|
||||||
result+='D'
|
result+='D'
|
||||||
.
|
.
|
||||||
call assert_equal('ABCD', pyxeval('result'))
|
pyx << trim eof
|
||||||
|
result+='E'
|
||||||
|
eof
|
||||||
|
call assert_equal('ABCDE', pyxeval('result'))
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -94,7 +94,10 @@ result+='B'
|
|||||||
pyx << trim
|
pyx << trim
|
||||||
result+='D'
|
result+='D'
|
||||||
.
|
.
|
||||||
call assert_equal('ABCD', pyxeval('result'))
|
pyx << trim eof
|
||||||
|
result+='E'
|
||||||
|
eof
|
||||||
|
call assert_equal('ABCDE', pyxeval('result'))
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -409,7 +409,10 @@ Vim.command('let s ..= "B"')
|
|||||||
ruby << trim
|
ruby << trim
|
||||||
Vim.command('let s ..= "D"')
|
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
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
672,
|
||||||
/**/
|
/**/
|
||||||
671,
|
671,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user