mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-18 08:13:43 -05:00
Fix winminwidth issue (#35)
This commit is contained in:
@@ -127,6 +127,7 @@ function! s:goyo_on(width)
|
|||||||
\ { 'laststatus': &laststatus,
|
\ { 'laststatus': &laststatus,
|
||||||
\ 'showtabline': &showtabline,
|
\ 'showtabline': &showtabline,
|
||||||
\ 'fillchars': &fillchars,
|
\ 'fillchars': &fillchars,
|
||||||
|
\ 'winminwidth': &winminwidth,
|
||||||
\ 'winwidth': &winwidth,
|
\ 'winwidth': &winwidth,
|
||||||
\ 'winminheight': &winminheight,
|
\ 'winminheight': &winminheight,
|
||||||
\ 'winheight': &winheight,
|
\ 'winheight': &winheight,
|
||||||
@@ -177,10 +178,10 @@ function! s:goyo_on(width)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Global options
|
" Global options
|
||||||
set winwidth=1
|
|
||||||
let &winheight = max([&winminheight, 1])
|
let &winheight = max([&winminheight, 1])
|
||||||
set winminheight=1
|
set winminheight=1
|
||||||
set winheight=1
|
set winheight=1
|
||||||
|
set winminwidth=1 winwidth=1
|
||||||
set laststatus=0
|
set laststatus=0
|
||||||
set showtabline=0
|
set showtabline=0
|
||||||
set noruler
|
set noruler
|
||||||
@@ -258,6 +259,10 @@ function! s:goyo_off()
|
|||||||
execute printf('normal! %dG%d|', line, col)
|
execute printf('normal! %dG%d|', line, col)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let wmw = remove(goyo_revert, 'winminwidth')
|
||||||
|
let ww = remove(goyo_revert, 'winwidth')
|
||||||
|
let &winwidth = ww
|
||||||
|
let &winminwidth = wmw
|
||||||
let wmh = remove(goyo_revert, 'winminheight')
|
let wmh = remove(goyo_revert, 'winminheight')
|
||||||
let wh = remove(goyo_revert, 'winheight')
|
let wh = remove(goyo_revert, 'winheight')
|
||||||
let &winheight = max([wmh, 1])
|
let &winheight = max([wmh, 1])
|
||||||
|
|||||||
Reference in New Issue
Block a user