From adb6fff7d054d4235ce82b9f3c843b7a78a7475b Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 1 Jan 2014 08:53:53 +0900 Subject: [PATCH] Need to reduce winheight before setting winminheight (#13) --- plugin/goyo.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugin/goyo.vim b/plugin/goyo.vim index aa15cf7..38e2a62 100644 --- a/plugin/goyo.vim +++ b/plugin/goyo.vim @@ -170,6 +170,7 @@ function! s:goyo_on(width) " Global options set winwidth=1 + let &winheight = max([&winminheight, 1]) set winminheight=1 set winheight=1 set laststatus=0 @@ -242,6 +243,12 @@ function! s:goyo_off() endif tabclose + let wmh = remove(goyo_revert, 'winminheight') + let wh = remove(goyo_revert, 'winheight') + let &winheight = max([wmh, 1]) + let &winminheight = wmh + let &winheight = wh + for [k, v] in items(goyo_revert) execute printf("let &%s = %s", k, string(v)) endfor