patch 8.2.1947: crash when using "zj" without folds
Problem: Crash when using "zj" without folds. (Sean Dewar)
Solution: Check for at least one fold. (closes #7245)
diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim
index 6224464..f0bd6e4 100644
--- a/src/testdir/test_fold.vim
+++ b/src/testdir/test_fold.vim
@@ -835,4 +835,13 @@
bwipe!
endfunc
+" this was crashing
+func Test_move_no_folds()
+ new
+ fold
+ setlocal fdm=expr
+ normal zj
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab