aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-04-22 08:14:42 -0400
committerGitHub <noreply@github.com>2021-04-22 08:14:42 -0400
commitbb33727922ca4549bb3b9b7aaaac1b535154b669 (patch)
tree57678c02a5d7319846e15416218f7dfeea703329 /src/nvim/testdir
parent8402865cbad2e905bd841c3d9054f1027898e750 (diff)
downloadrneovim-bb33727922ca4549bb3b9b7aaaac1b535154b669.tar.gz
rneovim-bb33727922ca4549bb3b9b7aaaac1b535154b669.tar.bz2
rneovim-bb33727922ca4549bb3b9b7aaaac1b535154b669.zip
vim-patch:8.2.2776: :mksession uses current value of 'splitbelow' and 'splitright' (#14398)
Problem: :mksession uses current value of 'splitbelow' and 'splitright' even though "options" is not in 'sessionoptions'. (Maxim Kim) Solution: Save and restore the values, instead of setting to the current value. (closes vim/vim#8119) https://github.com/vim/vim/commit/0995c81f2ffe276669daa004f7778ecc6f5ee09d Patch v8.2.1682 is not ported. Replace "goto fail;" with "return FAIL;".
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_mksession.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_mksession.vim b/src/nvim/testdir/test_mksession.vim
index 8486f3ff68..7bb76ad9eb 100644
--- a/src/nvim/testdir/test_mksession.vim
+++ b/src/nvim/testdir/test_mksession.vim
@@ -680,6 +680,24 @@ func Test_mksession_winpos()
set sessionoptions&
endfunc
+" Test for mksession without options restores winminheight
+func Test_mksession_winminheight()
+ set sessionoptions-=options
+ split
+ mksession! Xtest_mks.out
+ let found_restore = 0
+ let lines = readfile('Xtest_mks.out')
+ for line in lines
+ if line =~ '= s:save_winmin\(width\|height\)'
+ let found_restore += 1
+ endif
+ endfor
+ call assert_equal(2, found_restore)
+ call delete('Xtest_mks.out')
+ close
+ set sessionoptions&
+endfunc
+
" Test for mksession with 'compatible' option
func Test_mksession_compatible()
throw 'skipped: Nvim does not support "compatible" option'