mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-16 07:13:50 -05:00
Need to reduce winheight before setting winminheight (#13)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user