Skip to content

Commit

Permalink
Fix window position restoring in closing tab / window
Browse files Browse the repository at this point in the history
  • Loading branch information
KSR-Yasuda committed Apr 4, 2022
1 parent 88233cd commit 8a1e2a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion autoload/tabman.vim
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,15 @@ fu! s:ManDelete(...)
if exists('a:1')
exe 'bd' matchstr(eval, '\d\+\ze\w\d\+$')
el
let [currtab, currwin, s:snew] = [tabpagenr(), winnr(), 1]
let [currtab, currwin, lasttab, s:snew] = [tabpagenr(), winnr(), tabpagenr('$'), 1]
cal s:ManSelect()
if tabpagenr() < currtab && tabpagenr('$') < lasttab
let currtab -= 1
elseif tabpagenr() == currtab && winnr() < currwin
let currwin -= 1
en
clo
exe 'tabn' currtab '|' currwin.'winc w'
unl s:snew
en
cal s:ManRestore()
Expand Down

0 comments on commit 8a1e2a9

Please sign in to comment.