Patch 7.4.1732
Problem:    Folds may close when using autocomplete. (Anmol Sethi)
Solution:   Increment/decrement disable_fold. (Christian Brabandt, closes
            #643)
Files:      src/edit.c, src/fold.c, src/globals.h


*** ../vim-7.4.1731/src/edit.c  2016-03-02 21:51:52.147805190 +0100
--- src/edit.c  2016-04-14 16:18:50.879132200 +0200
***************
*** 1424,1431 ****
--- 1424,1433 ----
  
  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 */
*** ../vim-7.4.1731/src/fold.c  2016-01-30 16:39:20.426376606 +0100
--- src/fold.c  2016-04-14 16:21:36.521407537 +0200
***************
*** 811,816 ****
--- 811,819 ----
  {
      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
*** ../vim-7.4.1731/src/globals.h       2016-04-08 17:07:09.542160709 +0200
--- src/globals.h       2016-04-14 16:21:47.417294078 +0200
***************
*** 1176,1181 ****
--- 1176,1185 ----
  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);
*** ../vim-7.4.1731/src/version.c       2016-04-14 15:55:58.405348448 +0200
--- src/version.c       2016-04-14 16:21:17.853601921 +0200
***************
*** 750,751 ****
--- 750,753 ----
  {   /* Add new patch number below this line */
+ /**/
+     1732,
  /**/

-- 
    A KNIGHT rides into shot and hacks him to the ground.  He rides off.
    We stay for a moment on the glade.  A MIDDLE-AGED LADY in a C. & A.
    twin-set emerges from the trees and looks in horror at the body of her
    HUSBAND.
MRS HISTORIAN: FRANK!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui