Patch 8.2.2245
Problem: Vim9: return value of winrestcmd() cannot be executed.
Solution: Put colons before each range. (closes #7571)
Files: src/evalwindow.c, src/testdir/test_vim9_builtin.vim
*** ../vim-8.2.2244/src/evalwindow.c 2020-09-22 21:55:16.214978662 +0200
--- src/evalwindow.c 2020-12-29 18:56:07.306383344 +0100
***************
*** 1010,1018 ****
ga_init2(&ga, (int)sizeof(char), 70);
FOR_ALL_WINDOWS(wp)
{
! sprintf((char *)buf, "%dresize %d|", winnr, wp->w_height);
ga_concat(&ga, buf);
! sprintf((char *)buf, "vert %dresize %d|", winnr, wp->w_width);
ga_concat(&ga, buf);
++winnr;
}
--- 1010,1018 ----
ga_init2(&ga, (int)sizeof(char), 70);
FOR_ALL_WINDOWS(wp)
{
! sprintf((char *)buf, ":%dresize %d|", winnr, wp->w_height);
ga_concat(&ga, buf);
! sprintf((char *)buf, "vert :%dresize %d|", winnr, wp->w_width);
ga_concat(&ga, buf);
++winnr;
}
*** ../vim-8.2.2244/src/testdir/test_vim9_builtin.vim 2020-12-25
20:24:48.172245018 +0100
--- src/testdir/test_vim9_builtin.vim 2020-12-29 18:55:29.470506377 +0100
***************
*** 716,720 ****
--- 716,730 ----
close
enddef
+ def Test_winrestcmd()
+ split
+ var cmd = winrestcmd()
+ wincmd _
+ exe cmd
+ assert_equal(cmd, winrestcmd())
+ close
+ enddef
+
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
*** ../vim-8.2.2244/src/version.c 2020-12-29 12:46:47.662457054 +0100
--- src/version.c 2020-12-29 20:24:28.658840273 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2245,
/**/
--
Don't read everything you believe.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ 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/202012291925.0BTJPiWu721415%40masaka.moolenaar.net.