vim-patch:8.1.1585: :let-heredoc does not trim enough

Problem:    :let-heredoc does not trim enough.
Solution:   Trim indent from the contents based on the indent of the first
            line.  Use let-heredoc in more tests.
e7eb92708e

This is a missing part of Vim patch 8.1.1585 from #11211.
This commit is contained in:
zeertzjq
2021-12-23 07:41:23 +08:00
parent e3f615b205
commit b8d6ab04a2

View File

@@ -3243,32 +3243,32 @@ func Test_cindent_30()
setl cindent ts=4 sw=4 setl cindent ts=4 sw=4
setl cino=+20 setl cino=+20
let code =<< trim [CODE] let code =<< [CODE]
void void
foo() foo()
{ {
if (a) if (a)
{ {
} else } else
asdf; asdf;
} }
[CODE] [CODE]
call append(0, code) call append(0, code)
normal gg normal gg
normal ]]=][ normal ]]=][
let expected =<< trim [CODE] let expected =<< [CODE]
void void
foo() foo()
{ {
if (a) if (a)
{ {
} else } else
asdf; asdf;
} }
[CODE] [CODE]
call assert_equal(expected, getline(1, '$')) call assert_equal(expected, getline(1, '$'))
enew! | close enew! | close