Mercurial > vim
diff src/testdir/test_regexp_latin.vim @ 29777:f1c5bd4acbbc v9.0.0228
patch 9.0.0228: crash when pattern looks below the last line
Commit: https://github.com/vim/vim/commit/13ed494bb5edc5a02d0ed0feabddb68920f88570
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 19 13:59:25 2022 +0100
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 https://github.com/vim/vim/issues/10938)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 19 Aug 2022 15:00:04 +0200 |
parents | 1ad5585bed52 |
children | 22a5ccc0d634 |
line wrap: on
line diff
--- a/src/testdir/test_regexp_latin.vim +++ b/src/testdir/test_regexp_latin.vim @@ -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