Problem: Folds may close when using autocomplete. (Anmol Sethi)
Solution: Increment/decrement disable_fold. (Christian Brabandt, closes
#643)
docomplete:
compl_busy = TRUE;
+ disable_fold_update++; /* don't redraw folds here */
if (ins_complete(c, TRUE) == FAIL)
compl_cont_status = 0;
+ disable_fold_update--;
compl_busy = FALSE;
break;
#endif /* FEAT_INS_EXPAND */
{
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
EXTERN int fill_diff INIT(= '-');
#endif
+#ifdef FEAT_FOLDING
+EXTERN int disable_fold_update INIT(= 0);
+#endif
+
/* Whether 'keymodel' contains "stopsel" and "startsel". */
EXTERN int km_stopsel INIT(= FALSE);
EXTERN int km_startsel INIT(= FALSE);
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1732,
/**/
1731,
/**/