diff src/fold.c @ 8891:d7ba3f9b9ba6 v7.4.1732

commit https://github.com/vim/vim/commit/429fcfbf9a9275367fe9441a50a3dcd773497d84 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 14 16:22:04 2016 +0200 patch 7.4.1732 Problem: Folds may close when using autocomplete. (Anmol Sethi) Solution: Increment/decrement disable_fold. (Christian Brabandt, closes https://github.com/vim/vim/issues/643)
author Christian Brabandt <cb@256bit.org>
date Thu, 14 Apr 2016 16:30:05 +0200
parents 81794242a275
children c25898cc99c1
line wrap: on
line diff
--- a/src/fold.c
+++ b/src/fold.c
@@ -811,6 +811,9 @@ foldUpdate(win_T *wp, linenr_T top, line
 {
     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