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