diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-10 08:27:18 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-10 19:20:33 -0400 |
| commit | cb368e1bffe110a8b73b3c13e3780f2d587bbde2 (patch) | |
| tree | 4f519212043f2435352dac32331440eca93020da /src/nvim/testdir | |
| parent | 292037ef9b5bd47c862eaf577792cc2b068c0e71 (diff) | |
| download | rneovim-cb368e1bffe110a8b73b3c13e3780f2d587bbde2.tar.gz rneovim-cb368e1bffe110a8b73b3c13e3780f2d587bbde2.tar.bz2 rneovim-cb368e1bffe110a8b73b3c13e3780f2d587bbde2.zip | |
vim-patch:8.2.1702: crash when using undo after deleting folded lines
Problem: Crash when using undo after deleting folded lines.
Solution: Check for NULL pointer. (closes vim/vim#6968)
https://github.com/vim/vim/commit/da697645d5917eb3d4168c06c3442bef9fb746bf
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_fold.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index fcdf888b96..2cc5b47cb0 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -796,6 +796,26 @@ func Test_fold_delete_first_line() set foldmethod& endfunc +func Test_undo_fold_deletion() + new + set fdm=marker + let lines =<< trim END + " {{{ + " }}}1 + " {{{ + END + call setline(1, lines) + 3d + g/"/d + undo + redo + " eval getline(1, '$')->assert_equal(['']) + eval assert_equal(getline(1, '$'), ['']) + + set fdm&vim + bwipe! +endfunc + " this was crashing func Test_move_no_folds() new |