mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.2.2176: crash with a sequence of fold commands
Problem: Crash with a sequence of fold commands. Solution: Bail out when there are no folds at all. Add a test (Dominique Pellé) (closes #7515)
This commit is contained in:
@@ -916,7 +916,7 @@ foldMoveTo(
|
||||
{
|
||||
if (!foldFind(gap, curwin->w_cursor.lnum - lnum_off, &fp))
|
||||
{
|
||||
if (!updown)
|
||||
if (!updown || gap->ga_len == 0)
|
||||
break;
|
||||
|
||||
// When moving up, consider a fold above the cursor; when
|
||||
|
Reference in New Issue
Block a user