Permalink
Browse files

The original view wasn't always properly restored

  • Loading branch information...
1 parent 2c559fe commit 54c688cc2fef0fa6ba03b7e0ffd0d670cdddebda @tomtom committed Feb 7, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 autoload/tcommand.vim
View
@@ -75,14 +75,19 @@ function! tcommand#Select(reset, filter) "{{{3
let w.base = s:commands
" TLogVAR len(w.base)
let v = winsaveview()
+ let wrc = winrestcmd()
+ let winnr = winnr()
let help = 0
windo if &ft == 'help' | let help = 1 | endif
+ exec winnr 'wincmd w'
try
let item = tlib#input#ListD(w)
finally
if !help
silent! windo if &ft == 'help' | exec 'wincmd c' | endif
+ exec winnr 'wincmd w'
endif
+ exec wrc
call winrestview(v)
redraw
endtry

0 comments on commit 54c688c

Please sign in to comment.