From db0db05724d3eebe9e1462e082835c1f4ab7cbf7 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 13 May 2010 17:33:34 +0000 Subject: [PATCH] [7.2.421] Folds are sometimes not updated properly and there is no way to Problem: Folds are sometimes not updated properly and there is no way to force an update. Solution: Make "zx" and "zX" recompute folds (suggested by Christian Brabandt) Patch 7.2.421 --- src/normal.c | 6 ++++-- src/version.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/normal.c b/src/normal.c index 1b514b36..a19771b4 100644 --- a/src/normal.c +++ b/src/normal.c @@ -4936,13 +4936,15 @@ dozet: /* "zx": re-apply 'foldlevel' and open folds at the cursor */ case 'x': curwin->w_p_fen = TRUE; - newFoldLevel(); /* update right now */ + curwin->w_foldinvalid = TRUE; /* recompute folds */ + newFoldLevel(); /* update right now */ foldOpenCursor(); break; /* "zX": undo manual opens/closes, re-apply 'foldlevel' */ case 'X': curwin->w_p_fen = TRUE; - old_fdl = -1; /* force an update */ + curwin->w_foldinvalid = TRUE; /* recompute folds */ + old_fdl = -1; /* force an update */ break; /* "zm": fold more */ diff --git a/src/version.c b/src/version.c index 453a23b4..1f57dd7f 100644 --- a/src/version.c +++ b/src/version.c @@ -682,6 +682,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 421, +/**/ 420, /**/ 419, -- 2.11.4.GIT