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 / 7.4 / 7.4.490 < prev    next >
Encoding:
Internet Message Format  |  2014-10-31  |  6.7 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.490
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.4.490
  11. Problem:    Cannot specify the buffer to use for "do" and "dp", making them
  12.         useless for three-way diff.
  13. Solution:   Use the count as the buffer number. (James McCoy)
  14. Files:        runtime/doc/diff.txt, src/diff.c, src/normal.c, src/proto/diff.pro
  15.  
  16.  
  17. *** ../vim-7.4.489/runtime/doc/diff.txt    2013-08-10 13:24:52.000000000 +0200
  18. --- runtime/doc/diff.txt    2014-10-31 13:39:22.443236141 +0100
  19. ***************
  20. *** 95,101 ****
  21.   :difft[his]    Make the current window part of the diff windows.  This sets
  22.           the options like for "vimdiff".
  23.   
  24. ! :diffp[atch] {patchfile}                 *E816* *:diffp* *:diffpatch*
  25.           Use the current buffer, patch it with the diff found in
  26.           {patchfile} and open a buffer on the result.  The options are
  27.           set as for "vimdiff".
  28. --- 95,101 ----
  29.   :difft[his]    Make the current window part of the diff windows.  This sets
  30.           the options like for "vimdiff".
  31.   
  32. ! :diffp[atch] {patchfile}             *E816* *:diffp* *:diffpatch*
  33.           Use the current buffer, patch it with the diff found in
  34.           {patchfile} and open a buffer on the result.  The options are
  35.           set as for "vimdiff".
  36. ***************
  37. *** 123,132 ****
  38.   file for a moment and come back to the same file and be in diff mode again.
  39.   
  40.                               *:diffo* *:diffoff*
  41. ! :diffo[ff]    Switch off diff mode for the current window.
  42.   
  43.   :diffo[ff]!    Switch off diff mode for the current window and in all windows
  44. !         in the current tab page where 'diff' is set.
  45.   
  46.   The ":diffoff" command resets the relevant options to the values they had when
  47.   using |:diffsplit|, |:diffpatch| , |:diffthis|. or starting Vim in diff mode.
  48. --- 123,136 ----
  49.   file for a moment and come back to the same file and be in diff mode again.
  50.   
  51.                               *:diffo* *:diffoff*
  52. ! :diffo[ff]    Switch off diff mode for the current window.  Resets related
  53. !         options also when 'diff' was not set.
  54.   
  55.   :diffo[ff]!    Switch off diff mode for the current window and in all windows
  56. !         in the current tab page where 'diff' is set.  Resetting
  57. !         related options only happens in a window that has 'diff' set,
  58. !         if the current window does not have 'diff' set then no options
  59. !         in it are changed.
  60.   
  61.   The ":diffoff" command resets the relevant options to the values they had when
  62.   using |:diffsplit|, |:diffpatch| , |:diffthis|. or starting Vim in diff mode.
  63. ***************
  64. *** 262,274 ****
  65.           See below for [range].
  66.   
  67.                               *do*
  68. ! do        Same as ":diffget" without argument or range.  The "o" stands
  69. !         for "obtain" ("dg" can't be used, it could be the start of
  70. !         "dgg"!). Note: this doesn't work in Visual mode.
  71.   
  72.                               *dp*
  73. ! dp        Same as ":diffput" without argument or range.
  74. !         Note: this doesn't work in Visual mode.
  75.   
  76.   
  77.   When no [range] is given, the diff at the cursor position or just above it is
  78. --- 266,282 ----
  79.           See below for [range].
  80.   
  81.                               *do*
  82. ! [count]do    Same as ":diffget" without range.  The "o" stands for "obtain"
  83. !         ("dg" can't be used, it could be the start of "dgg"!). Note:
  84. !         this doesn't work in Visual mode.
  85. !         If you give a [count], it is used as the [bufspec] argument
  86. !         for ":diffget".
  87.   
  88.                               *dp*
  89. ! [count]dp    Same as ":diffput" without range.  Note: this doesn't work in
  90. !         Visual mode.
  91. !         If you give a [count], it is used as the [bufspec] argument
  92. !         for ":diffput".
  93.   
  94.   
  95.   When no [range] is given, the diff at the cursor position or just above it is
  96. *** ../vim-7.4.489/src/diff.c    2014-10-15 12:56:44.006015955 +0200
  97. --- src/diff.c    2014-10-31 13:44:20.739228953 +0100
  98. ***************
  99. *** 2107,2118 ****
  100.    * "dp" and "do" commands.
  101.    */
  102.       void
  103. ! nv_diffgetput(put)
  104.       int        put;
  105.   {
  106.       exarg_T    ea;
  107.   
  108. !     ea.arg = (char_u *)"";
  109.       if (put)
  110.       ea.cmdidx = CMD_diffput;
  111.       else
  112. --- 2107,2126 ----
  113.    * "dp" and "do" commands.
  114.    */
  115.       void
  116. ! nv_diffgetput(put, count)
  117.       int        put;
  118. +     long    count;
  119.   {
  120.       exarg_T    ea;
  121. +     char_u    buf[30];
  122.   
  123. !     if (count == 0)
  124. !     ea.arg = (char_u *)"";
  125. !     else
  126. !     {
  127. !     vim_snprintf((char *)buf, 30, "%ld", count);
  128. !     ea.arg = buf;
  129. !     }
  130.       if (put)
  131.       ea.cmdidx = CMD_diffput;
  132.       else
  133. *** ../vim-7.4.489/src/normal.c    2014-10-09 14:48:26.284898230 +0200
  134. --- src/normal.c    2014-10-31 13:36:32.671240232 +0100
  135. ***************
  136. *** 9284,9290 ****
  137.       if (cap->oap->op_type == OP_DELETE && cap->cmdchar == 'p')
  138.       {
  139.           clearop(cap->oap);
  140. !         nv_diffgetput(TRUE);
  141.       }
  142.       else
  143.   #endif
  144. --- 9284,9290 ----
  145.       if (cap->oap->op_type == OP_DELETE && cap->cmdchar == 'p')
  146.       {
  147.           clearop(cap->oap);
  148. !         nv_diffgetput(TRUE, cap->opcount);
  149.       }
  150.       else
  151.   #endif
  152. ***************
  153. *** 9407,9413 ****
  154.       if (cap->oap->op_type == OP_DELETE && cap->cmdchar == 'o')
  155.       {
  156.       clearop(cap->oap);
  157. !     nv_diffgetput(FALSE);
  158.       }
  159.       else
  160.   #endif
  161. --- 9407,9413 ----
  162.       if (cap->oap->op_type == OP_DELETE && cap->cmdchar == 'o')
  163.       {
  164.       clearop(cap->oap);
  165. !     nv_diffgetput(FALSE, cap->opcount);
  166.       }
  167.       else
  168.   #endif
  169. *** ../vim-7.4.489/src/proto/diff.pro    2013-08-10 13:37:07.000000000 +0200
  170. --- src/proto/diff.pro    2014-10-31 13:36:32.671240232 +0100
  171. ***************
  172. *** 18,24 ****
  173.   int diffopt_horizontal __ARGS((void));
  174.   int diff_find_change __ARGS((win_T *wp, linenr_T lnum, int *startp, int *endp));
  175.   int diff_infold __ARGS((win_T *wp, linenr_T lnum));
  176. ! void nv_diffgetput __ARGS((int put));
  177.   void ex_diffgetput __ARGS((exarg_T *eap));
  178.   int diff_mode_buf __ARGS((buf_T *buf));
  179.   int diff_move_to __ARGS((int dir, long count));
  180. --- 18,24 ----
  181.   int diffopt_horizontal __ARGS((void));
  182.   int diff_find_change __ARGS((win_T *wp, linenr_T lnum, int *startp, int *endp));
  183.   int diff_infold __ARGS((win_T *wp, linenr_T lnum));
  184. ! void nv_diffgetput __ARGS((int put, long count));
  185.   void ex_diffgetput __ARGS((exarg_T *eap));
  186.   int diff_mode_buf __ARGS((buf_T *buf));
  187.   int diff_move_to __ARGS((int dir, long count));
  188. *** ../vim-7.4.489/src/version.c    2014-10-31 12:41:57.427319153 +0100
  189. --- src/version.c    2014-10-31 13:37:54.511238260 +0100
  190. ***************
  191. *** 743,744 ****
  192. --- 743,746 ----
  193.   {   /* Add new patch number below this line */
  194. + /**/
  195. +     490,
  196.   /**/
  197.  
  198. -- 
  199. GUARD #2:  It could be carried by an African swallow!
  200. GUARD #1:  Oh, yeah, an African swallow maybe, but not a European swallow,
  201.            that's my point.
  202. GUARD #2:  Oh, yeah, I agree with that...
  203.                                   The Quest for the Holy Grail (Monty Python)
  204.  
  205.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  206. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  207. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  208.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  209.