Restart Goyo on :Goyo DIM when surrounding windows are gone

Close #83
This commit is contained in:
Junegunn Choi
2015-10-13 02:17:16 +09:00
parent c1293a91a3
commit 635109f514

View File

@@ -417,6 +417,10 @@ function! goyo#execute(bang, dim)
if exists('#goyo') == 0
call s:goyo_on(a:dim)
elseif !empty(a:dim)
if winnr('$') < 5
call s:goyo_off()
return goyo#execute(a:bang, a:dim)
endif
let dim = s:parse_arg(a:dim)
if !empty(dim)
let t:goyo_dim = dim