Skip to content

Commit

Permalink
Fix always selects top split problem (#54)
Browse files Browse the repository at this point in the history
Note that this commit fixes the problem partly, kinda halfway fix.
Need more investigation
  • Loading branch information
tacahiroy committed Oct 25, 2014
1 parent 31f1c87 commit 22a62c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoload/ctrlp/funky.vim
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ function! ctrlp#funky#funky(word)
let g:ctrlp_default_input = a:word
endif

let s:winnr = winnr()
call ctrlp#init(ctrlp#funky#id())
finally
if exists('default_input_save')
Expand Down Expand Up @@ -316,8 +317,8 @@ function! ctrlp#funky#accept(mode, str)
call ctrlp#exit()

" should be current window = former window
let bufnr = matchstr(a:str, '\d\+\ze:\d\+$')
let lnum = matchstr(a:str, '\d\+$')
execute 'noautocmd ' . get(s:, 'winnr', 1) . 'wincmd w'
call cursor(lnum, 1)

call s:after_jump()
Expand Down

0 comments on commit 22a62c7

Please sign in to comment.