File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -902,6 +902,8 @@ foldMoveTo(
902902 // that moves the cursor is used.
903903 lnum_off = 0 ;
904904 gap = & curwin -> w_folds ;
905+ if (gap -> ga_len == 0 )
906+ break ;
905907 use_level = FALSE;
906908 maybe_small = FALSE;
907909 lnum_found = curwin -> w_cursor .lnum ;
Original file line number Diff line number Diff line change @@ -835,4 +835,13 @@ func Test_undo_fold_deletion()
835835 bwipe!
836836endfunc
837837
838+ " this was crashing
839+ func Test_move_no_folds ()
840+ new
841+ fold
842+ setlocal fdm = expr
843+ normal zj
844+ bwipe!
845+ endfunc
846+
838847" vim: shiftwidth = 2 sts = 2 expandtab
Original file line number Diff line number Diff line change @@ -750,6 +750,8 @@ static char *(features[]) =
750750
751751static int included_patches [] =
752752{ /* Add new patch number below this line */
753+ /**/
754+ 1947 ,
753755/**/
754756 1946 ,
755757/**/
You can’t perform that action at this time.
0 commit comments