vim-patch:8.1.1588: in :let-heredoc line continuation is recognized (#29767)

Problem:    In :let-heredoc line continuation is recognized.
Solution:   Do not consume line continuation. (Ozaki Kiichi, closes vim/vim#4580)

e96a2498f9

Nvim already sets may_garbage_collect to false in nv_event(), so the
timer change isn't needed.
Other changes have already been ported.
Also fix incorrect port of test in patch 8.1.1356.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq 2024-07-17 20:06:59 +08:00 committed by GitHub
parent 05dcda8f9b
commit 5d7fd74397
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 6 deletions

View File

@ -521,12 +521,12 @@ END
END END
call assert_equal(['vim', '', 'end', ' END', 'END '], var3) call assert_equal(['vim', '', 'end', ' END', 'END '], var3)
let var1 =<< trim END let var1 =<< trim END
Line1 Line1
Line2 Line2
Line3 Line3
END END
END END
call assert_equal(['Line1', ' Line2', "\tLine3", ' END'], var1) call assert_equal(['Line1', ' Line2', "\tLine3", ' END'], var1)
let var1 =<< trim !!! let var1 =<< trim !!!
@ -563,6 +563,14 @@ END
END END
call assert_equal(['something', 'endfunc'], var1) call assert_equal(['something', 'endfunc'], var1)
" not concatenate lines
let var1 =<< END
some
\thing
\ else
END
call assert_equal(['some', ' \thing', ' \ else'], var1)
" ignore "python << xx" " ignore "python << xx"
let var1 =<<END let var1 =<<END
something something

View File

@ -163,6 +163,7 @@ endfunc
" horizontally or vertically. " horizontally or vertically.
func Test_o_arg() func Test_o_arg()
let after =<< trim [CODE] let after =<< trim [CODE]
set cpo&vim
call writefile([winnr("$"), call writefile([winnr("$"),
\ winheight(1), winheight(2), &lines, \ winheight(1), winheight(2), &lines,
\ winwidth(1), winwidth(2), &columns, \ winwidth(1), winwidth(2), &columns,