Patch 8.2.2649
Problem: Vim9: some wincmd arguments cause a white space error.
Solution: Insert a space before the count. (closes #8001)
Files: src/window.c, src/testdir/test_vim9_cmd.vim
*** ../vim-8.2.2648/src/window.c 2021-03-13 14:28:59.339594607 +0100
--- src/window.c 2021-03-24 20:04:50.397247408 +0100
***************
*** 750,760 ****
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);
}
/*
--- 750,759 ----
size_t bufsize,
long Prenum)
{
if (Prenum > 0)
! vim_snprintf((char *)bufp, bufsize, "%s %ld", cmd, Prenum);
! else
! STRCPY(bufp, cmd);
}
/*
*** ../vim-8.2.2648/src/testdir/test_vim9_cmd.vim 2021-03-14
13:21:31.789065156 +0100
--- src/testdir/test_vim9_cmd.vim 2021-03-24 20:06:37.972974627 +0100
***************
*** 1056,1061 ****
--- 1056,1082 ----
endif
assert_notequal(id1, win_getid())
close
+
+ split
+ var id = win_getid()
+ split
+ :2wincmd o
+ assert_equal(id, win_getid())
+ only
+
+ split
+ split
+ assert_equal(3, winnr('$'))
+ :2wincmd c
+ assert_equal(2, winnr('$'))
+ only
+
+ split
+ split
+ assert_equal(3, winnr('$'))
+ :2wincmd q
+ assert_equal(2, winnr('$'))
+ only
enddef
def Test_windo_missing_endif()
*** ../vim-8.2.2648/src/version.c 2021-03-23 19:22:08.942052565 +0100
--- src/version.c 2021-03-24 19:57:59.770306042 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2649,
/**/
--
If they don't keep on exercising their lips, he thought, their brains
start working.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202103241908.12OJ8cNL2922713%40masaka.moolenaar.net.