Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the bug #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions plugin/taglist.vim
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
"
" ****************** Do not modify after this line ************************

"store pre window's nr
let s:pre_win_nr = 0

" Line continuation used here
let s:cpo_save = &cpo
set cpo&vim
Expand Down Expand Up @@ -2522,6 +2525,12 @@ function! s:Tlist_Window_Close()
" If a window other than the taglist window is open,
" then only close the taglist window.
close
"jump back to the origin window even if we do nothing but close
"the tlist window
let winnum = bufwinnr(s:pre_win_nr)
if winnr() != winnum
exe winnum . 'wincmd w'
endif
endif
else
" Goto the taglist window, close it and then come back to the
Expand Down Expand Up @@ -2551,6 +2560,7 @@ endfunction
" Tlist_Window_Open
" Open and refresh the taglist window
function! s:Tlist_Window_Open()
let s:pre_win_nr = bufnr('%')
call s:Tlist_Log_Msg('Tlist_Window_Open()')
" If the window is open, jump to it
let winnum = bufwinnr(g:TagList_title)
Expand Down