# HG changeset patch # User Bram Moolenaar # Date 1371151446 -7200 # Node ID fefd8d33a7ea43f86d6e5a2ab30440140ada14f6 # Parent a15a4a226a23b426e8e2a6f6d7724f293e988b7f updated for version 7.3.1187 Problem: "s:" is recognized but "" is not. (ZyX) Solution: Translate "" like "s:". diff --git a/src/eval.c b/src/eval.c --- a/src/eval.c +++ b/src/eval.c @@ -10976,21 +10976,22 @@ f_function(argvars, rettv) EMSG2(_("E700: Unknown function: %s"), s); else { - if (STRNCMP(s, "s:", 2) == 0) + if (STRNCMP(s, "s:", 2) == 0 || STRNCMP(s, "", 5) == 0) { char sid_buf[25]; - - /* Expand s: into nr_, so that the function can also be - * called from another script. Using trans_function_name() would - * also work, but some plugins depend on the name being printable - * text. */ + int off = *s == 's' ? 2 : 5; + + /* Expand s: and into nr_, so that the function can + * also be called from another script. Using trans_function_name() + * would also work, but some plugins depend on the name being + * printable text. */ sprintf(sid_buf, "%ld_", (long)current_SID); rettv->vval.v_string = - alloc((int)(STRLEN(sid_buf) + STRLEN(s + 2) + 1)); + alloc((int)(STRLEN(sid_buf) + STRLEN(s + off) + 1)); if (rettv->vval.v_string != NULL) { STRCPY(rettv->vval.v_string, sid_buf); - STRCAT(rettv->vval.v_string, s + 2); + STRCAT(rettv->vval.v_string, s + off); } } else diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1187, +/**/ 1186, /**/ 1185,