commit | c136a3528b7ebb825c3863d701af44f023381181 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Nov 03 20:05:40 2020 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Nov 03 20:05:40 2020 +0100 |
tree | 3578f565a084562a2c5c803a4820e33cdadbfbbc | |
parent | 35efa22ff2b98126363098db9304796b5624f97f [diff] [blame] |
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/fold.c b/src/fold.c index 8a904f6..4b4e618 100644 --- a/src/fold.c +++ b/src/fold.c
@@ -902,6 +902,8 @@ // 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;