patch 8.2.2649: Vim9: some wincmd arguments cause a white space error
Problem: Vim9: some wincmd arguments cause a white space error.
Solution: Insert a space before the count. (closes #8001)
diff --git a/src/window.c b/src/window.c
index 3e32b37..3a68762 100644
--- a/src/window.c
+++ b/src/window.c
@@ -750,11 +750,10 @@
size_t bufsize,
long Prenum)
{
- size_t len = STRLEN(cmd);
-
- STRCPY(bufp, cmd);
if (Prenum > 0)
- vim_snprintf((char *)bufp + len, bufsize - len, "%ld", Prenum);
+ vim_snprintf((char *)bufp, bufsize, "%s %ld", cmd, Prenum);
+ else
+ STRCPY(bufp, cmd);
}
/*