aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-08-19 21:23:43 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-08-19 21:32:24 -0400
commitec9b57cb6e6679b7f08001677fc523a5d0a2a819 (patch)
tree8fccd674b239de43b8592a56a7b856f631392347 /src/nvim/testdir
parent419c946f03824aff84aed0db27f3709bb697133f (diff)
downloadrneovim-ec9b57cb6e6679b7f08001677fc523a5d0a2a819.tar.gz
rneovim-ec9b57cb6e6679b7f08001677fc523a5d0a2a819.tar.bz2
rneovim-ec9b57cb6e6679b7f08001677fc523a5d0a2a819.zip
vim-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 vim/vim#4834) https://github.com/vim/vim/commit/9a4a8c4d5993c6371486c895a515c2ad351e9aaa
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_fold.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim
index df3d691d85..4036eae678 100644
--- a/src/nvim/testdir/test_fold.vim
+++ b/src/nvim/testdir/test_fold.vim
@@ -740,3 +740,19 @@ func Test_folds_marker_in_comment2()
set foldmethod&
bwipe!
endfunc
+
+func Test_fold_delete_with_marker()
+ new
+ call setline(1, ['func Func() {{{1', 'endfunc'])
+ 1,2yank
+ new
+ set fdm=marker
+ call setline(1, 'x')
+ normal! Vp
+ normal! zd
+ call assert_equal(['func Func() ', 'endfunc'], getline(1, '$'))
+
+ set fdm&
+ bwipe!
+ bwipe!
+endfunc