0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1491: Vim9: crash when compiling heredoc lines start with comment

Problem:    Vim9: crash when compiling heredoc lines start with comment.
Solution:   Skip over NULL pointers. Do not remove comment and empty lines
            when fetching function lines. (closes #6743)
This commit is contained in:
Bram Moolenaar
2020-08-20 15:02:42 +02:00
parent 93ad14710b
commit 66250c932e
16 changed files with 81 additions and 45 deletions

View File

@@ -1141,6 +1141,17 @@ def Test_list_vimscript()
assert_equal(['one', 'two', 'three'], mylist)
END
CheckScriptSuccess(lines)
# check all lines from heredoc are kept
lines =<< trim END
# comment 1
two
# comment 3
five
# comment 6
END
assert_equal(['# comment 1', 'two', '# comment 3', '', 'five', '# comment 6'], lines)
enddef
if has('channel')