mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
vim-patch:8.2.1947: crash when using "zj" without folds (#13222)
Problem: Crash when using "zj" without folds. (Sean Dewar)
Solution: Check for at least one fold. (closes vim/vim#7245)
c136a3528b
This commit is contained in:
@@ -888,6 +888,9 @@ int foldMoveTo(
|
||||
// that moves the cursor is used.
|
||||
linenr_T lnum_off = 0;
|
||||
garray_T *gap = &curwin->w_folds;
|
||||
if (gap->ga_len == 0) {
|
||||
break;
|
||||
}
|
||||
bool use_level = false;
|
||||
bool maybe_small = false;
|
||||
linenr_T lnum_found = curwin->w_cursor.lnum;
|
||||
|
Reference in New Issue
Block a user