Mercurial > vim
comparison src/testdir/test_fold.vim @ 17787:92e0996e1cb8 v8.1.1890
patch 8.1.1890: ml_get error when deleting fold marker
commit https://github.com/vim/vim/commit/9a4a8c4d5993c6371486c895a515c2ad351e9aaa
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 19 22:48:30 2019 +0200
patch 8.1.1890: ml_get error when deleting fold marker
Problem: Ml_get error when deleting fold marker.
Solution: Check that the line number is not below the last line. Adjust the
fold when deleting the empty line. (Christian Brabandt,
closes #4834)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 19 Aug 2019 23:00:05 +0200 |
parents | 0da9bc55c31a |
children | 73ddc462979d |
comparison
equal
deleted
inserted
replaced
17786:ebc8c095bbf7 | 17787:92e0996e1cb8 |
---|---|
739 call assert_equal(['Lorem ipsum dolor sit<!--}}}-->'], getreg(0,1,1)) | 739 call assert_equal(['Lorem ipsum dolor sit<!--}}}-->'], getreg(0,1,1)) |
740 | 740 |
741 set foldmethod& | 741 set foldmethod& |
742 bwipe! | 742 bwipe! |
743 endfunc | 743 endfunc |
744 | |
745 func Test_fold_delete_with_marker() | |
746 new | |
747 call setline(1, ['func Func() {{{1', 'endfunc']) | |
748 1,2yank | |
749 new | |
750 set fdm=marker | |
751 call setline(1, 'x') | |
752 normal! Vp | |
753 normal! zd | |
754 call assert_equal(['func Func() ', 'endfunc'], getline(1, '$')) | |
755 | |
756 set fdm& | |
757 bwipe! | |
758 bwipe! | |
759 endfunc |