Patch 8.0.0253
Problem: When creating a session when winminheight is 2 or larger and
loading that session gives an error.
Solution: Also set winminheight before setting winheight to 1. (Rafael
Bodill, neovim #5717)
Files: src/ex_docmd.c, src/testdir/test_mksession.vim
*** ../vim-8.0.0252/src/ex_docmd.c 2017-01-28 15:58:45.348197250 +0100
--- src/ex_docmd.c 2017-01-28 17:06:39.426330240 +0100
***************
*** 11197,11204 ****
* resized when moving between windows.
* Do this before restoring the view, so that the topline and the
* cursor can be set. This is done again below.
*/
! if (put_line(fd, "set winheight=1 winwidth=1") == FAIL)
return FAIL;
if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL)
return FAIL;
--- 11197,11206 ----
* resized when moving between windows.
* Do this before restoring the view, so that the topline and the
* cursor can be set. This is done again below.
+ * winminheight and winminwidth need to be set to avoid an error if the
+ * user has set winheight or winwidth.
*/
! if (put_line(fd, "set winminheight=1 winheight=1 winminwidth=1
winwidth=1") == FAIL)
return FAIL;
if (nr > 1 && ses_winsizes(fd, restore_size, tab_firstwin) == FAIL)
return FAIL;
***************
*** 11268,11273 ****
--- 11270,11279 ----
if (fprintf(fd, "set winheight=%ld winwidth=%ld shortmess=%s",
p_wh, p_wiw, p_shm) < 0 || put_eol(fd) == FAIL)
return FAIL;
+ /* Re-apply 'winminheight' and 'winminwidth'. */
+ if (fprintf(fd, "set winminheight=%ld winminwidth=%ld",
+ p_wmh, p_wmw) < 0 || put_eol(fd) == FAIL)
+ return FAIL;
/*
* Lastly, execute the x.vim file if it exists.
*** ../vim-8.0.0252/src/testdir/test_mksession.vim 2016-12-01
18:47:06.595684409 +0100
--- src/testdir/test_mksession.vim 2017-01-28 17:02:24.403943278 +0100
***************
*** 101,104 ****
--- 101,113 ----
let &wrap = wrap_save
endfunc
+ func Test_mksession_winheight()
+ new
+ set winheight=10 winminheight=2
+ mksession! test_mks.out
+ source test_mks.out
+
+ " call delete('test_mks.out')
+ endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.0.0252/src/version.c 2017-01-28 16:39:15.876735290 +0100
--- src/version.c 2017-01-28 17:02:47.651796246 +0100
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 253,
/**/
--
Advice to worms: Sleep late.
/// 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].
For more options, visit https://groups.google.com/d/optout.