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