]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1727: minor problems with the teapot v9.0.1727
authorSean Dewar <seandewar@users.noreply.github.com>
Sat, 8 Jul 2023 09:35:19 +0000 (10:35 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 17 Aug 2023 20:48:43 +0000 (22:48 +0200)
Problem: minor problems with the teapot()
Solution: remove the null check, update documentation

Update the builtin-function-list entry. (It implicitly returns 0, but such
functions usually use "none")

Also, tv_get_string_strict() can not return NULL, so remove that check

closes: #12647

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
runtime/doc/builtin.txt
src/evalfunc.c
src/version.c

index 2f6961d7dc7be58bb2b04ac053729735ea338fb0..6a5ec1bacb74d58711f141ea423e58efbb626b76 100644 (file)
@@ -156,7 +156,7 @@ digraph_setlist({digraphlist})      Boolean register multiple |digraph|s
 echoraw({expr})                        none    output {expr} as-is
 empty({expr})                  Number  |TRUE| if {expr} is empty
 environ()                      Dict    return environment variables
-err_teapot()                   Number  produce error 418
+err_teapot([{expr}])           none    give E418, or E503 if {expr} is |TRUE|
 escape({string}, {chars})      String  escape {chars} in {string} with '\'
 eval({string})                 any     evaluate {string} into its value
 eventhandler()                 Number  |TRUE| if inside an event handler
index ab6606f76fd9374f4c6f70679c020fcf171e71e9..ef0414c6898396d319457b90fc74fe7a0cc06560 100644 (file)
@@ -3936,7 +3936,7 @@ f_err_teapot(typval_T *argvars, typval_T *rettv UNUSED)
        if (argvars[0].v_type == VAR_STRING)
        {
            char_u *s = tv_get_string_strict(&argvars[0]);
-           if (s == NULL || *skipwhite(s) == NUL)
+           if (*skipwhite(s) == NUL)
                return;
        }
 
index 0661b279ba2604c4e35a2b99338bedd4facc7cf3..b9e584d2059ea7cdccc07a97b92a4f636d8f2681 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1727,
 /**/
     1726,
 /**/