diff options
-rw-r--r-- | src/eval.c | 29 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 21 insertions, 10 deletions
diff --git a/src/eval.c b/src/eval.c index 8583610734..b08f296576 100644 --- a/src/eval.c +++ b/src/eval.c @@ -5761,22 +5761,31 @@ func_tv2string(typval_T *tv, char_u **tofree, int echo_style) if (echo_style) { - r = tv->vval.v_string == NULL ? (char_u *)"function()" - : make_ufunc_name_readable(tv->vval.v_string, - buf, MAX_FUNC_NAME_LEN); - if (r == buf && tv->vval.v_string != NULL) + if (tv->vval.v_string == NULL) { - r = vim_strsave(buf); - *tofree = r; + r = (char_u *)"function()"; + *tofree = NULL; } else - *tofree = NULL; + { + r = make_ufunc_name_readable(tv->vval.v_string, buf, + MAX_FUNC_NAME_LEN); + if (r == buf) + { + r = vim_strsave(buf); + *tofree = r; + } + else + *tofree = NULL; + } } else { - *tofree = string_quote(tv->vval.v_string == NULL ? NULL - : make_ufunc_name_readable(tv->vval.v_string, - buf, MAX_FUNC_NAME_LEN), TRUE); + if (tv->vval.v_string == NULL) + *tofree = string_quote(NULL, TRUE); + else + *tofree = string_quote(make_ufunc_name_readable(tv->vval.v_string, + buf, MAX_FUNC_NAME_LEN), TRUE); r = *tofree; } diff --git a/src/version.c b/src/version.c index 92088fc95f..8a1cab3f29 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 448, +/**/ 447, /**/ 446, |