summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-03-24 20:08:12 +0100
committerBram Moolenaar <Bram@vim.org>2021-03-24 20:08:12 +0100
commit1ff89deeaa07a161afbe91f57c340f3758d34f49 (patch)
tree28243c15cb05fa45c226be2b3c96c097ea616c1e /src/window.c
parentc54f347d63bcca97ead673d01ac6b59914bb04e5 (diff)
downloadvim-git-1ff89deeaa07a161afbe91f57c340f3758d34f49.tar.gz
patch 8.2.2649: Vim9: some wincmd arguments cause a white space errorv8.2.2649
Problem: Vim9: some wincmd arguments cause a white space error. Solution: Insert a space before the count. (closes #8001)
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/window.c b/src/window.c
index 3e32b3759..3a68762a5 100644
--- a/src/window.c
+++ b/src/window.c
@@ -750,11 +750,10 @@ cmd_with_count(
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);
}
/*