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