Mercurial > vim
comparison src/testdir/test_fold.vim @ 22306:86696c617f70 v8.2.1702
patch 8.2.1702: crash when using undo after deleting folded lines
Commit: https://github.com/vim/vim/commit/da697645d5917eb3d4168c06c3442bef9fb746bf
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 17 19:36:04 2020 +0200
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 https://github.com/vim/vim/issues/6968)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 17 Sep 2020 19:45:04 +0200 |
parents | 08940efa6b4e |
children | 3c72820f88b2 |
comparison
equal
deleted
inserted
replaced
22305:fc3288b65910 | 22306:86696c617f70 |
---|---|
814 | 814 |
815 set foldmethod& foldexpr& | 815 set foldmethod& foldexpr& |
816 close! | 816 close! |
817 endfunc | 817 endfunc |
818 | 818 |
819 func Test_undo_fold_deletion() | |
820 new | |
821 set fdm=marker | |
822 let lines =<< trim END | |
823 " {{{ | |
824 " }}}1 | |
825 " {{{ | |
826 END | |
827 call setline(1, lines) | |
828 3d | |
829 g/"/d | |
830 undo | |
831 redo | |
832 eval getline(1, '$')->assert_equal(['']) | |
833 | |
834 set fdm&vim | |
835 bwipe! | |
836 endfunc | |
837 | |
819 " vim: shiftwidth=2 sts=2 expandtab | 838 " vim: shiftwidth=2 sts=2 expandtab |