Patch 8.2.1947
Problem: Crash when using "zj" without folds. (Sean Dewar)
Solution: Check for at least one fold. (closes #7245)
Files: src/fold.c, src/testdir/test_fold.vim
*** ../vim-8.2.1946/src/fold.c 2020-09-17 19:35:53.646187488 +0200
--- src/fold.c 2020-11-03 20:03:07.515107938 +0100
***************
*** 902,907 ****
--- 902,909 ----
// that moves the cursor is used.
lnum_off = 0;
gap = &curwin->w_folds;
+ if (gap->ga_len == 0)
+ break;
use_level = FALSE;
maybe_small = FALSE;
lnum_found = curwin->w_cursor.lnum;
*** ../vim-8.2.1946/src/testdir/test_fold.vim 2020-09-17 19:35:53.646187488
+0200
--- src/testdir/test_fold.vim 2020-11-03 20:02:41.299170854 +0100
***************
*** 835,838 ****
--- 835,847 ----
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
*** ../vim-8.2.1946/src/version.c 2020-11-03 18:51:50.505968361 +0100
--- src/version.c 2020-11-03 20:05:09.862813527 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1947,
/**/
--
hundred-and-one symptoms of being an internet addict:
188. You purchase a laptop so you can surf while sitting on the can.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202011031906.0A3J6BSr3836702%40masaka.moolenaar.net.