Karsten Hopp 1394eb
To: vim_dev@googlegroups.com
Karsten Hopp 1394eb
Subject: Patch 7.4.490
Karsten Hopp 1394eb
Fcc: outbox
Karsten Hopp 1394eb
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 1394eb
Mime-Version: 1.0
Karsten Hopp 1394eb
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 1394eb
Content-Transfer-Encoding: 8bit
Karsten Hopp 1394eb
------------
Karsten Hopp 1394eb
Karsten Hopp 1394eb
Patch 7.4.490
Karsten Hopp 1394eb
Problem:    Cannot specify the buffer to use for "do" and "dp", making them
Karsten Hopp 1394eb
	    useless for three-way diff.
Karsten Hopp 1394eb
Solution:   Use the count as the buffer number. (James McCoy)
Karsten Hopp 1394eb
Files:	    runtime/doc/diff.txt, src/diff.c, src/normal.c, src/proto/diff.pro
Karsten Hopp 1394eb
Karsten Hopp 1394eb
Karsten Hopp 1394eb
*** ../vim-7.4.489/runtime/doc/diff.txt	2013-08-10 13:24:52.000000000 +0200
Karsten Hopp 1394eb
--- runtime/doc/diff.txt	2014-10-31 13:39:22.443236141 +0100
Karsten Hopp 1394eb
***************
Karsten Hopp 1394eb
*** 95,101 ****
Karsten Hopp 1394eb
  :difft[his]	Make the current window part of the diff windows.  This sets
Karsten Hopp 1394eb
  		the options like for "vimdiff".
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
! :diffp[atch] {patchfile}				 *E816* *:diffp* *:diffpatch*
Karsten Hopp 1394eb
  		Use the current buffer, patch it with the diff found in
Karsten Hopp 1394eb
  		{patchfile} and open a buffer on the result.  The options are
Karsten Hopp 1394eb
  		set as for "vimdiff".
Karsten Hopp 1394eb
--- 95,101 ----
Karsten Hopp 1394eb
  :difft[his]	Make the current window part of the diff windows.  This sets
Karsten Hopp 1394eb
  		the options like for "vimdiff".
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
! :diffp[atch] {patchfile}			 *E816* *:diffp* *:diffpatch*
Karsten Hopp 1394eb
  		Use the current buffer, patch it with the diff found in
Karsten Hopp 1394eb
  		{patchfile} and open a buffer on the result.  The options are
Karsten Hopp 1394eb
  		set as for "vimdiff".
Karsten Hopp 1394eb
***************
Karsten Hopp 1394eb
*** 123,132 ****
Karsten Hopp 1394eb
  file for a moment and come back to the same file and be in diff mode again.
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  							*:diffo* *:diffoff*
Karsten Hopp 1394eb
! :diffo[ff]	Switch off diff mode for the current window.
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  :diffo[ff]!	Switch off diff mode for the current window and in all windows
Karsten Hopp 1394eb
! 		in the current tab page where 'diff' is set.
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  The ":diffoff" command resets the relevant options to the values they had when
Karsten Hopp 1394eb
  using |:diffsplit|, |:diffpatch| , |:diffthis|. or starting Vim in diff mode.
Karsten Hopp 1394eb
--- 123,136 ----
Karsten Hopp 1394eb
  file for a moment and come back to the same file and be in diff mode again.
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  							*:diffo* *:diffoff*
Karsten Hopp 1394eb
! :diffo[ff]	Switch off diff mode for the current window.  Resets related
Karsten Hopp 1394eb
! 		options also when 'diff' was not set.
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  :diffo[ff]!	Switch off diff mode for the current window and in all windows
Karsten Hopp 1394eb
! 		in the current tab page where 'diff' is set.  Resetting
Karsten Hopp 1394eb
! 		related options only happens in a window that has 'diff' set,
Karsten Hopp 1394eb
! 		if the current window does not have 'diff' set then no options
Karsten Hopp 1394eb
! 		in it are changed.
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  The ":diffoff" command resets the relevant options to the values they had when
Karsten Hopp 1394eb
  using |:diffsplit|, |:diffpatch| , |:diffthis|. or starting Vim in diff mode.
Karsten Hopp 1394eb
***************
Karsten Hopp 1394eb
*** 262,274 ****
Karsten Hopp 1394eb
  		See below for [range].
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  							*do*
Karsten Hopp 1394eb
! do		Same as ":diffget" without argument or range.  The "o" stands
Karsten Hopp 1394eb
! 		for "obtain" ("dg" can't be used, it could be the start of
Karsten Hopp 1394eb
! 		"dgg"!). Note: this doesn't work in Visual mode.
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  							*dp*
Karsten Hopp 1394eb
! dp		Same as ":diffput" without argument or range.
Karsten Hopp 1394eb
! 		Note: this doesn't work in Visual mode.
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  When no [range] is given, the diff at the cursor position or just above it is
Karsten Hopp 1394eb
--- 266,282 ----
Karsten Hopp 1394eb
  		See below for [range].
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  							*do*
Karsten Hopp 1394eb
! [count]do	Same as ":diffget" without range.  The "o" stands for "obtain"
Karsten Hopp 1394eb
! 		("dg" can't be used, it could be the start of "dgg"!). Note:
Karsten Hopp 1394eb
! 		this doesn't work in Visual mode.
Karsten Hopp 1394eb
! 		If you give a [count], it is used as the [bufspec] argument
Karsten Hopp 1394eb
! 		for ":diffget".
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  							*dp*
Karsten Hopp 1394eb
! [count]dp	Same as ":diffput" without range.  Note: this doesn't work in
Karsten Hopp 1394eb
! 		Visual mode.
Karsten Hopp 1394eb
! 		If you give a [count], it is used as the [bufspec] argument
Karsten Hopp 1394eb
! 		for ":diffput".
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
  When no [range] is given, the diff at the cursor position or just above it is
Karsten Hopp 1394eb
*** ../vim-7.4.489/src/diff.c	2014-10-15 12:56:44.006015955 +0200
Karsten Hopp 1394eb
--- src/diff.c	2014-10-31 13:44:20.739228953 +0100
Karsten Hopp 1394eb
***************
Karsten Hopp 1394eb
*** 2107,2118 ****
Karsten Hopp 1394eb
   * "dp" and "do" commands.
Karsten Hopp 1394eb
   */
Karsten Hopp 1394eb
      void
Karsten Hopp 1394eb
! nv_diffgetput(put)
Karsten Hopp 1394eb
      int		put;
Karsten Hopp 1394eb
  {
Karsten Hopp 1394eb
      exarg_T	ea;
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
!     ea.arg = (char_u *)"";
Karsten Hopp 1394eb
      if (put)
Karsten Hopp 1394eb
  	ea.cmdidx = CMD_diffput;
Karsten Hopp 1394eb
      else
Karsten Hopp 1394eb
--- 2107,2126 ----
Karsten Hopp 1394eb
   * "dp" and "do" commands.
Karsten Hopp 1394eb
   */
Karsten Hopp 1394eb
      void
Karsten Hopp 1394eb
! nv_diffgetput(put, count)
Karsten Hopp 1394eb
      int		put;
Karsten Hopp 1394eb
+     long	count;
Karsten Hopp 1394eb
  {
Karsten Hopp 1394eb
      exarg_T	ea;
Karsten Hopp 1394eb
+     char_u	buf[30];
Karsten Hopp 1394eb
  
Karsten Hopp 1394eb
!     if (count == 0)
Karsten Hopp 1394eb
! 	ea.arg = (char_u *)"";
Karsten Hopp 1394eb
!     else
Karsten Hopp 1394eb
!     {
Karsten Hopp 1394eb
! 	vim_snprintf((char *)buf, 30, "%ld", count);
Karsten Hopp 1394eb
! 	ea.arg = buf;
Karsten Hopp 1394eb
!     }
Karsten Hopp 1394eb
      if (put)
Karsten Hopp 1394eb
  	ea.cmdidx = CMD_diffput;
Karsten Hopp 1394eb
      else
Karsten Hopp 1394eb
*** ../vim-7.4.489/src/normal.c	2014-10-09 14:48:26.284898230 +0200
Karsten Hopp 1394eb
--- src/normal.c	2014-10-31 13:36:32.671240232 +0100
Karsten Hopp 1394eb
***************
Karsten Hopp 1394eb
*** 9284,9290 ****
Karsten Hopp 1394eb
  	if (cap->oap->op_type == OP_DELETE && cap->cmdchar == 'p')
Karsten Hopp 1394eb
  	{
Karsten Hopp 1394eb
  	    clearop(cap->oap);
Karsten Hopp 1394eb
! 	    nv_diffgetput(TRUE);
Karsten Hopp 1394eb
  	}
Karsten Hopp 1394eb
  	else
Karsten Hopp 1394eb
  #endif
Karsten Hopp 1394eb
--- 9284,9290 ----
Karsten Hopp 1394eb
  	if (cap->oap->op_type == OP_DELETE && cap->cmdchar == 'p')
Karsten Hopp 1394eb
  	{
Karsten Hopp 1394eb
  	    clearop(cap->oap);
Karsten Hopp 1394eb
! 	    nv_diffgetput(TRUE, cap->opcount);
Karsten Hopp 1394eb
  	}
Karsten Hopp 1394eb
  	else
Karsten Hopp 1394eb
  #endif
Karsten Hopp 1394eb
***************
Karsten Hopp 1394eb
*** 9407,9413 ****
Karsten Hopp 1394eb
      if (cap->oap->op_type == OP_DELETE && cap->cmdchar == 'o')
Karsten Hopp 1394eb
      {
Karsten Hopp 1394eb
  	clearop(cap->oap);
Karsten Hopp 1394eb
! 	nv_diffgetput(FALSE);
Karsten Hopp 1394eb
      }
Karsten Hopp 1394eb
      else
Karsten Hopp 1394eb
  #endif
Karsten Hopp 1394eb
--- 9407,9413 ----
Karsten Hopp 1394eb
      if (cap->oap->op_type == OP_DELETE && cap->cmdchar == 'o')
Karsten Hopp 1394eb
      {
Karsten Hopp 1394eb
  	clearop(cap->oap);
Karsten Hopp 1394eb
! 	nv_diffgetput(FALSE, cap->opcount);
Karsten Hopp 1394eb
      }
Karsten Hopp 1394eb
      else
Karsten Hopp 1394eb
  #endif
Karsten Hopp 1394eb
*** ../vim-7.4.489/src/proto/diff.pro	2013-08-10 13:37:07.000000000 +0200
Karsten Hopp 1394eb
--- src/proto/diff.pro	2014-10-31 13:36:32.671240232 +0100
Karsten Hopp 1394eb
***************
Karsten Hopp 1394eb
*** 18,24 ****
Karsten Hopp 1394eb
  int diffopt_horizontal __ARGS((void));
Karsten Hopp 1394eb
  int diff_find_change __ARGS((win_T *wp, linenr_T lnum, int *startp, int *endp));
Karsten Hopp 1394eb
  int diff_infold __ARGS((win_T *wp, linenr_T lnum));
Karsten Hopp 1394eb
! void nv_diffgetput __ARGS((int put));
Karsten Hopp 1394eb
  void ex_diffgetput __ARGS((exarg_T *eap));
Karsten Hopp 1394eb
  int diff_mode_buf __ARGS((buf_T *buf));
Karsten Hopp 1394eb
  int diff_move_to __ARGS((int dir, long count));
Karsten Hopp 1394eb
--- 18,24 ----
Karsten Hopp 1394eb
  int diffopt_horizontal __ARGS((void));
Karsten Hopp 1394eb
  int diff_find_change __ARGS((win_T *wp, linenr_T lnum, int *startp, int *endp));
Karsten Hopp 1394eb
  int diff_infold __ARGS((win_T *wp, linenr_T lnum));
Karsten Hopp 1394eb
! void nv_diffgetput __ARGS((int put, long count));
Karsten Hopp 1394eb
  void ex_diffgetput __ARGS((exarg_T *eap));
Karsten Hopp 1394eb
  int diff_mode_buf __ARGS((buf_T *buf));
Karsten Hopp 1394eb
  int diff_move_to __ARGS((int dir, long count));
Karsten Hopp 1394eb
*** ../vim-7.4.489/src/version.c	2014-10-31 12:41:57.427319153 +0100
Karsten Hopp 1394eb
--- src/version.c	2014-10-31 13:37:54.511238260 +0100
Karsten Hopp 1394eb
***************
Karsten Hopp 1394eb
*** 743,744 ****
Karsten Hopp 1394eb
--- 743,746 ----
Karsten Hopp 1394eb
  {   /* Add new patch number below this line */
Karsten Hopp 1394eb
+ /**/
Karsten Hopp 1394eb
+     490,
Karsten Hopp 1394eb
  /**/
Karsten Hopp 1394eb
Karsten Hopp 1394eb
-- 
Karsten Hopp 1394eb
GUARD #2:  It could be carried by an African swallow!
Karsten Hopp 1394eb
GUARD #1:  Oh, yeah, an African swallow maybe, but not a European swallow,
Karsten Hopp 1394eb
           that's my point.
Karsten Hopp 1394eb
GUARD #2:  Oh, yeah, I agree with that...
Karsten Hopp 1394eb
                                  The Quest for the Holy Grail (Monty Python)
Karsten Hopp 1394eb
Karsten Hopp 1394eb
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 1394eb
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 1394eb
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 1394eb
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///