jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone
8b9a1c
To: vim_dev@googlegroups.com
8b9a1c
Subject: Patch 7.4.145
8b9a1c
Fcc: outbox
8b9a1c
From: Bram Moolenaar <Bram@moolenaar.net>
8b9a1c
Mime-Version: 1.0
8b9a1c
Content-Type: text/plain; charset=UTF-8
8b9a1c
Content-Transfer-Encoding: 8bit
8b9a1c
------------
8b9a1c
8b9a1c
Patch 7.4.145
8b9a1c
Problem:    getregtype() does not return zero for unknown register.
8b9a1c
Solution:   Adjust documention: return empty string for unknown register.
8b9a1c
	    Check the register name to be valid. (Yukihiro Nakadaira)
8b9a1c
Files:	    runtime/doc/eval.txt, src/ops.c
8b9a1c
8b9a1c
8b9a1c
*** ../vim-7.4.144/runtime/doc/eval.txt	2013-11-09 01:44:38.000000000 +0100
8b9a1c
--- runtime/doc/eval.txt	2014-01-14 12:24:35.000000000 +0100
8b9a1c
***************
8b9a1c
*** 3459,3465 ****
8b9a1c
  		    "v"			for |characterwise| text
8b9a1c
  		    "V"			for |linewise| text
8b9a1c
  		    "<CTRL-V>{width}"	for |blockwise-visual| text
8b9a1c
! 		    0			for an empty or unknown register
8b9a1c
  		<CTRL-V> is one character with value 0x16.
8b9a1c
  		If {regname} is not specified, |v:register| is used.
8b9a1c
  
8b9a1c
--- 3460,3466 ----
8b9a1c
  		    "v"			for |characterwise| text
8b9a1c
  		    "V"			for |linewise| text
8b9a1c
  		    "<CTRL-V>{width}"	for |blockwise-visual| text
8b9a1c
! 		    ""			for an empty or unknown register
8b9a1c
  		<CTRL-V> is one character with value 0x16.
8b9a1c
  		If {regname} is not specified, |v:register| is used.
8b9a1c
  
8b9a1c
*** ../vim-7.4.144/src/ops.c	2013-11-21 14:39:58.000000000 +0100
8b9a1c
--- src/ops.c	2014-01-14 12:28:33.000000000 +0100
8b9a1c
***************
8b9a1c
*** 6240,6246 ****
8b9a1c
      regname = may_get_selection(regname);
8b9a1c
  #endif
8b9a1c
  
8b9a1c
!     /* Should we check for a valid name? */
8b9a1c
      get_yank_register(regname, FALSE);
8b9a1c
  
8b9a1c
      if (y_current->y_array != NULL)
8b9a1c
--- 6240,6248 ----
8b9a1c
      regname = may_get_selection(regname);
8b9a1c
  #endif
8b9a1c
  
8b9a1c
!     if (regname != NUL && !valid_yank_reg(regname, FALSE))
8b9a1c
!         return MAUTO;
8b9a1c
! 
8b9a1c
      get_yank_register(regname, FALSE);
8b9a1c
  
8b9a1c
      if (y_current->y_array != NULL)
8b9a1c
*** ../vim-7.4.144/src/version.c	2014-01-14 12:18:41.000000000 +0100
8b9a1c
--- src/version.c	2014-01-14 12:26:13.000000000 +0100
8b9a1c
***************
8b9a1c
*** 740,741 ****
8b9a1c
--- 740,743 ----
8b9a1c
  {   /* Add new patch number below this line */
8b9a1c
+ /**/
8b9a1c
+     145,
8b9a1c
  /**/
8b9a1c
8b9a1c
-- 
8b9a1c
hundred-and-one symptoms of being an internet addict:
8b9a1c
151. You find yourself engaged to someone you've never actually met,
8b9a1c
     except through e-mail.
8b9a1c
8b9a1c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
8b9a1c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
8b9a1c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
8b9a1c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///