Blob Blame History Raw
To: vim_dev@googlegroups.com
Subject: Patch 7.3.649
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.649
Problem:    When 'clipboard' is set to "unnamed" small deletes end up in the
	    numbered registers. (Ingo Karkat)
Solution:   Use the original register name to decide whether to put a delete
	    in a numbered register. (Christian Brabandt)
Files:	    src/ops.c


*** ../vim-7.3.648/src/ops.c	2012-08-08 18:01:00.000000000 +0200
--- src/ops.c	2012-09-05 14:13:32.000000000 +0200
***************
*** 1623,1628 ****
--- 1623,1629 ----
  #endif
      linenr_T		old_lcount = curbuf->b_ml.ml_line_count;
      int			did_yank = FALSE;
+     int			orig_regname = oap->regname;
  
      if (curbuf->b_ml.ml_flags & ML_EMPTY)	    /* nothing to do */
  	return OK;
***************
*** 1715,1722 ****
  	/*
  	 * Put deleted text into register 1 and shift number registers if the
  	 * delete contains a line break, or when a regname has been specified.
  	 */
! 	if (oap->regname != 0 || oap->motion_type == MLINE
  				   || oap->line_count > 1 || oap->use_reg_one)
  	{
  	    y_current = &y_regs[9];
--- 1716,1725 ----
  	/*
  	 * Put deleted text into register 1 and shift number registers if the
  	 * delete contains a line break, or when a regname has been specified.
+ 	 * Use the register name from before adjust_clip_reg() may have
+ 	 * changed it.
  	 */
! 	if (orig_regname != 0 || oap->motion_type == MLINE
  				   || oap->line_count > 1 || oap->use_reg_one)
  	{
  	    y_current = &y_regs[9];
*** ../vim-7.3.648/src/version.c	2012-09-05 13:30:22.000000000 +0200
--- src/version.c	2012-09-05 14:17:55.000000000 +0200
***************
*** 721,722 ****
--- 721,724 ----
  {   /* Add new patch number below this line */
+ /**/
+     649,
  /**/

-- 
'I generally avoid temptation unless I can't resist it."
		-- Mae West

 /// Bram Moolenaar -- Bram@Moolenaar.net -- 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    ///