mirror of
https://github.com/vim/vim.git
synced 2025-10-18 07:54:29 -04:00
patch 8.2.1037: Vim9: crash when using line continuation inside :def
Problem: Vim9: crash when using line continuation inside :def. Solution: Check for no more lines available.
This commit is contained in:
@@ -837,5 +837,16 @@ def Test_sort_return_type()
|
||||
res = [1, 2, 3]->sort()
|
||||
enddef
|
||||
|
||||
def Line_continuation_in_def(dir: string = ''): string
|
||||
let path: string = empty(dir)
|
||||
\ ? 'empty'
|
||||
\ : 'full'
|
||||
return path
|
||||
enddef
|
||||
|
||||
def Test_line_continuation_in_def()
|
||||
assert_equal('full', Line_continuation_in_def('.'))
|
||||
enddef
|
||||
|
||||
|
||||
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
|
||||
|
Reference in New Issue
Block a user