diff options
author | James McCoy <jamessan@jamessan.com> | 2017-09-26 15:39:41 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-09-26 15:50:00 -0400 |
commit | 5bb2a19417e33ef573411b2069ab3d8095f7a9fa (patch) | |
tree | a3264e7c40ddb89bc8b80921edac7c4a95aabf0c | |
parent | 1c7f396f0cba3e87c4c1cae041489e28d59d1306 (diff) | |
download | rneovim-5bb2a19417e33ef573411b2069ab3d8095f7a9fa.tar.gz rneovim-5bb2a19417e33ef573411b2069ab3d8095f7a9fa.tar.bz2 rneovim-5bb2a19417e33ef573411b2069ab3d8095f7a9fa.zip |
vim-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 vim/vim#5717)
https://github.com/vim/vim/commit/36ae89c550a4f0a380606c3fb4a054957ad698f0
-rw-r--r-- | src/nvim/ex_docmd.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_mksession.vim | 9 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 47e23b6e80..5145c65bc7 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -8933,6 +8933,8 @@ makeopens ( // 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 winminwidth=1 winheight=1 winwidth=1") == FAIL) { return FAIL; diff --git a/src/nvim/testdir/test_mksession.vim b/src/nvim/testdir/test_mksession.vim index 928f065efb..284bafab75 100644 --- a/src/nvim/testdir/test_mksession.vim +++ b/src/nvim/testdir/test_mksession.vim @@ -100,6 +100,15 @@ func Test_mksession() 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 + " Verify that arglist is stored correctly to the session file. func Test_mksession_arglist() argdel * diff --git a/src/nvim/version.c b/src/nvim/version.c index 80018f6eab..f2686eacec 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -699,7 +699,7 @@ static const int included_patches[] = { // 256, // 255, // 254, - // 253, + 253, // 252, // 251, 250, |