Go back to the correct tab when disabling Goyo (#24)

This commit is contained in:
Junegunn Choi
2014-04-11 21:12:31 +09:00
parent 02bf007fb7
commit 16929c8d5d

View File

@@ -115,6 +115,8 @@ function! s:tranquilize()
endfunction
function! s:goyo_on(width)
let s:orig_tab = tabpagenr()
" New tab
tab split
@@ -249,6 +251,7 @@ function! s:goyo_off()
bd
endif
tabclose
execute 'normal! '.s:orig_tab.'gt'
let wmh = remove(goyo_revert, 'winminheight')
let wh = remove(goyo_revert, 'winheight')