Patch 7.1.057
Problem:    Problem with CursorHoldI when using "r" in Visual mode (Max
            Dyckhoff)
Solution:   Ignore CursorHold(I) when getting a second character for a Normal
            mode command.  Also abort the "r" command in Visual when a special
            key is typed.
Files:      src/normal.c


*** ../vim-7.1.056/src/normal.c Tue Jul 10 14:02:51 2007
--- src/normal.c        Sun Aug  5 21:57:43 2007
***************
*** 889,894 ****
--- 889,899 ----
  
        ++no_mapping;
        ++allow_keys;           /* no mapping for nchar, but allow key codes */
+ #ifdef FEAT_AUTOCMD
+       /* Don't generate a CursorHold event here, most commands can't handle
+        * it, e.g., nv_replace(), nv_csearch(). */
+       did_cursorhold = TRUE;
+ #endif
        if (ca.cmdchar == 'g')
        {
            /*
***************
*** 6662,6667 ****
--- 6668,6680 ----
      else
        had_ctrl_v = NUL;
  
+     /* Abort if the character is a special key. */
+     if (IS_SPECIAL(cap->nchar))
+     {
+       clearopbeep(cap->oap);
+       return;
+     }
+ 
  #ifdef FEAT_VISUAL
      /* Visual mode "r" */
      if (VIsual_active)
***************
*** 6688,6698 ****
      }
  #endif
  
!     /*
!      * Check for a special key or not enough characters to replace.
!      */
      ptr = ml_get_cursor();
!     if (IS_SPECIAL(cap->nchar) || STRLEN(ptr) < (unsigned)cap->count1
  #ifdef FEAT_MBYTE
            || (has_mbyte && mb_charlen(ptr) < cap->count1)
  #endif
--- 6701,6709 ----
      }
  #endif
  
!     /* Abort if not enough characters to replace. */
      ptr = ml_get_cursor();
!     if (STRLEN(ptr) < (unsigned)cap->count1
  #ifdef FEAT_MBYTE
            || (has_mbyte && mb_charlen(ptr) < cap->count1)
  #endif
*** ../vim-7.1.056/src/version.c        Tue Aug  7 21:59:26 2007
--- src/version.c       Wed Aug  8 21:39:43 2007
***************
*** 668,669 ****
--- 668,671 ----
  {   /* Add new patch number below this line */
+ /**/
+     57,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
95. Only communication in your household is through email.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui