0
0
mirror of https://github.com/vim/vim.git synced 2025-10-06 05:44:14 -04:00

patch 9.0.0228: crash when pattern looks below the last line

Problem:    Crash when pattern looks below the last line.
Solution:   Consider invalid lines to be empty. (closes #10938)
This commit is contained in:
Bram Moolenaar
2022-08-19 13:59:25 +01:00
parent 213e70e284
commit 13ed494bb5
4 changed files with 35 additions and 10 deletions

View File

@@ -1129,4 +1129,16 @@ func Test_recursive_substitute_expr()
delfunc Repl
endfunc
def Test_compare_columns()
# this was using a line below the last line
enew
setline(1, ['', ''])
prop_type_add('name', {highlight: 'ErrorMsg'})
prop_add(1, 1, {length: 1, type: 'name'})
search('\%#=1\%>.l\n.*\%<2v', 'nW')
search('\%#=2\%>.l\n.*\%<2v', 'nW')
bwipe!
prop_type_delete('name')
enddef
" vim: shiftwidth=2 sts=2 expandtab