Patch 7.4.1758
Problem:    Triggering CursorHoldI when in CTRL-X mode causes problems.
Solution:   Do not trigger CursorHoldI in CTRL-X mode. Add "!" flag to
            feedkeys() (test with that didn't work though).
Files:      src/edit.c, src/eval.c


*** ../vim-7.4.1757/src/edit.c  2016-04-20 16:39:14.422613016 +0200
--- src/edit.c  2016-04-20 17:22:44.407656379 +0200
***************
*** 1526,1532 ****
  
  #ifdef FEAT_AUTOCMD
        /* If typed something may trigger CursorHoldI again. */
!       if (c != K_CURSORHOLD)
            did_cursorhold = FALSE;
  #endif
  
--- 1526,1537 ----
  
  #ifdef FEAT_AUTOCMD
        /* If typed something may trigger CursorHoldI again. */
!       if (c != K_CURSORHOLD
! # ifdef FEAT_COMPL_FUNC
!           /* but not in CTRL-X mode, a script can't restore the state */
!           && ctrl_x_mode == 0
! # endif
!              )
            did_cursorhold = FALSE;
  #endif
  
*** ../vim-7.4.1757/src/eval.c  2016-04-20 14:59:19.047369459 +0200
--- src/eval.c  2016-04-20 17:19:39.657651757 +0200
***************
*** 11547,11552 ****
--- 11547,11553 ----
      char_u    nbuf[NUMBUFLEN];
      int               typed = FALSE;
      int               execute = FALSE;
+     int               dangerous = FALSE;
      char_u    *keys_esc;
  
      /* This is not allowed in the sandbox.  If the commands would still be
***************
*** 11569,11574 ****
--- 11570,11576 ----
                case 't': typed = TRUE; break;
                case 'i': insert = TRUE; break;
                case 'x': execute = TRUE; break;
+               case '!': dangerous = TRUE; break;
            }
        }
      }
***************
*** 11592,11600 ****
                /* Avoid a 1 second delay when the keys start Insert mode. */
                msg_scroll = FALSE;
  
!               ++ex_normal_busy;
                exec_normal(TRUE);
!               --ex_normal_busy;
                msg_scroll |= save_msg_scroll;
            }
        }
--- 11594,11604 ----
                /* Avoid a 1 second delay when the keys start Insert mode. */
                msg_scroll = FALSE;
  
!               if (!dangerous)
!                   ++ex_normal_busy;
                exec_normal(TRUE);
!               if (!dangerous)
!                   --ex_normal_busy;
                msg_scroll |= save_msg_scroll;
            }
        }
*** ../vim-7.4.1757/src/version.c       2016-04-20 16:39:14.422613016 +0200
--- src/version.c       2016-04-20 16:55:49.380395399 +0200
***************
*** 750,751 ****
--- 750,753 ----
  {   /* Add new patch number below this line */
+ /**/
+     1758,
  /**/

-- 
Shit makes the flowers grow and that's beautiful

 /// 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