home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.2.493 < prev    next >
Encoding:
Internet Message Format  |  2004-04-22  |  2.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.493
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.2.493
  11. Problem:    "@x" doesn't work when 'insertmode' is set. (Benji Fisher)
  12. Solution:   Put "restart_edit" in the typeahead buffer, so that it's used
  13.         after executing the register contents.
  14. Files:        src/ops.c
  15.  
  16.  
  17. *** ../vim-6.2.492/src/ops.c    Mon Apr 19 20:26:43 2004
  18. --- src/ops.c    Fri Apr 23 15:14:01 2004
  19. ***************
  20. *** 96,101 ****
  21. --- 96,102 ----
  22.   #endif
  23.   static void    get_yank_register __ARGS((int regname, int writing));
  24.   static int    stuff_yank __ARGS((int, char_u *));
  25. + static void    put_reedit_in_typebuf __ARGS((void));
  26.   static int    put_in_typebuf __ARGS((char_u *s, int colon));
  27.   static void    stuffescaped __ARGS((char_u *arg, int literally));
  28.   static int    get_spec_reg __ARGS((int regname, char_u **argp, int *allocated, int errmsg));
  29. ***************
  30. *** 1154,1159 ****
  31. --- 1155,1161 ----
  32.       /*
  33.        * Insert lines into typeahead buffer, from last one to first one.
  34.        */
  35. +     put_reedit_in_typebuf();
  36.       for (i = y_current->y_size; --i >= 0; )
  37.       {
  38.           /* insert NL between lines and after last line if type is MLINE */
  39. ***************
  40. *** 1175,1180 ****
  41. --- 1177,1209 ----
  42.       return retval;
  43.   }
  44.   
  45. + /*
  46. +  * If "restart_edit" is not zero, put it in the typeahead buffer, so that it's
  47. +  * used only after other typeahead has been processed.
  48. +  */
  49. +     static void
  50. + put_reedit_in_typebuf()
  51. + {
  52. +     char_u    buf[3];
  53. +     if (restart_edit != NUL)
  54. +     {
  55. +     if (restart_edit == 'V')
  56. +     {
  57. +         buf[0] = 'g';
  58. +         buf[1] = 'R';
  59. +         buf[2] = NUL;
  60. +     }
  61. +     else
  62. +     {
  63. +         buf[0] = restart_edit == 'I' ? 'i' : restart_edit;
  64. +         buf[1] = NUL;
  65. +     }
  66. +     if (ins_typebuf(buf, REMAP_NONE, 0, TRUE, FALSE) == OK)
  67. +         restart_edit = NUL;
  68. +     }
  69. + }
  70.       static int
  71.   put_in_typebuf(s, colon)
  72.       char_u    *s;
  73. ***************
  74. *** 1182,1187 ****
  75. --- 1211,1217 ----
  76.   {
  77.       int        retval = OK;
  78.   
  79. +     put_reedit_in_typebuf();
  80.       if (colon)
  81.       retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, FALSE);
  82.       if (retval == OK)
  83. *** ../vim-6.2.492/src/version.c    Fri Apr 23 12:02:42 2004
  84. --- src/version.c    Fri Apr 23 15:16:05 2004
  85. ***************
  86. *** 639,640 ****
  87. --- 639,642 ----
  88.   {   /* Add new patch number below this line */
  89. + /**/
  90. +     493,
  91.   /**/
  92.  
  93. -- 
  94. The average life of an organization chart is six months.  You can safely
  95. ignore any order from your boss that would take six months to complete.
  96.                 (Scott Adams - The Dilbert principle)
  97.  
  98.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  99. ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  100. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  101.  \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
  102.