summaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-13 17:35:59 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-13 17:35:59 +0200
commit38ab0e21b826579759d4f01285ea0a43e85d5c1c (patch)
treef4a98a2aba5163a80fb4170492c63a4aad742fde /src/normal.c
parenteb4883fabcb728df01e33054de987a752ef5482e (diff)
downloadvim-git-38ab0e21b826579759d4f01285ea0a43e85d5c1c.tar.gz
updated for version 7.2.421v7.2.421
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)
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/normal.c b/src/normal.c
index 1b514b36f..a19771b4f 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 */