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.
diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim
index 78dbead..09f8067 100644
--- a/src/testdir/test_highlight.vim
+++ b/src/testdir/test_highlight.vim
@@ -578,12 +578,13 @@
throw 'Skipped: cannot make screendumps'
endif
- call writefile([
- \ 'set cursorline cursorcolumn rnu',
- \ 'call setline(1, ["","1111111111","22222222222","3 here 3",""])',
- \ 'set wincolor=Pmenu',
- \ '/here',
- \ ], 'Xtest_wincolor')
+ let lines =<< trim END
+ set cursorline cursorcolumn rnu
+ call setline(1, ["","1111111111","22222222222","3 here 3",""])
+ set wincolor=Pmenu
+ /here
+ END
+ call writefile(lines, 'Xtest_wincolor')
let buf = RunVimInTerminal('-S Xtest_wincolor', {'rows': 8})
call term_wait(buf)
call term_sendkeys(buf, "2G5lvj")