summaryrefslogtreecommitdiff
path: root/src/fold.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-04-14 16:22:04 +0200
committerBram Moolenaar <Bram@vim.org>2016-04-14 16:22:04 +0200
commit429fcfbf9a9275367fe9441a50a3dcd773497d84 (patch)
tree60edefaa455e444f1dbc6f0e38cb7b0d80dd965e /src/fold.c
parent8110a091bc749d8748a20807a724a3af3ca6d509 (diff)
downloadvim-git-429fcfbf9a9275367fe9441a50a3dcd773497d84.tar.gz
patch 7.4.1732v7.4.1732
Problem: Folds may close when using autocomplete. (Anmol Sethi) Solution: Increment/decrement disable_fold. (Christian Brabandt, closes #643)
Diffstat (limited to 'src/fold.c')
-rw-r--r--src/fold.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fold.c b/src/fold.c
index e0b2609d9..8b9ca35eb 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -811,6 +811,9 @@ foldUpdate(win_T *wp, linenr_T top, linenr_T bot)
{
fold_T *fp;
+ if (disable_fold_update > 0)
+ return;
+
/* Mark all folds from top to bot as maybe-small. */
(void)foldFind(&wp->w_folds, top, &fp);
while (fp < (fold_T *)wp->w_folds.ga_data + wp->w_folds.ga_len