From: Bram Moolenaar Date: Tue, 14 Jan 2014 11:33:36 +0000 (+0100) Subject: updated for version 7.4.145 X-Git-Tag: v7.4.145 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32b9201f3726b26d1b5a558f95919cf0575a4b78;p=vim updated for version 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) --- diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index be0e667b7..f8f3b99bc 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -3460,7 +3460,7 @@ getregtype([{regname}]) *getregtype()* "v" for |characterwise| text "V" for |linewise| text "{width}" for |blockwise-visual| text - 0 for an empty or unknown register + "" for an empty or unknown register is one character with value 0x16. If {regname} is not specified, |v:register| is used. diff --git a/src/ops.c b/src/ops.c index d2060a47e..66b9b5949 100644 --- a/src/ops.c +++ b/src/ops.c @@ -6240,7 +6240,9 @@ get_reg_type(regname, reglen) regname = may_get_selection(regname); #endif - /* Should we check for a valid name? */ + if (regname != NUL && !valid_yank_reg(regname, FALSE)) + return MAUTO; + get_yank_register(regname, FALSE); if (y_current->y_array != NULL) diff --git a/src/version.c b/src/version.c index 8ecdef609..ed8a10adb 100644 --- a/src/version.c +++ b/src/version.c @@ -738,6 +738,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 145, /**/ 144, /**/