mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-16 15:23: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
|
" Global options
|
||||||
set winwidth=1
|
set winwidth=1
|
||||||
|
let &winheight = max([&winminheight, 1])
|
||||||
set winminheight=1
|
set winminheight=1
|
||||||
set winheight=1
|
set winheight=1
|
||||||
set laststatus=0
|
set laststatus=0
|
||||||
@@ -242,6 +243,12 @@ function! s:goyo_off()
|
|||||||
endif
|
endif
|
||||||
tabclose
|
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)
|
for [k, v] in items(goyo_revert)
|
||||||
execute printf("let &%s = %s", k, string(v))
|
execute printf("let &%s = %s", k, string(v))
|
||||||
endfor
|
endfor
|
||||||
|
|||||||
Reference in New Issue
Block a user