Skip to content

Commit

Permalink
Use global winnr.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiaslundberg committed Jan 16, 2016
1 parent c79b2a7 commit 17d1b6a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions autoload/ctrlp/funky.vim
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ function! ctrlp#funky#funky(word, ...)
let s:is_deep = get(opts, 'deep', 0)
let s:is_multi_buffers = get(opts, 'multi_buffers', 0)

let s:winnr = winnr()
call ctrlp#init(ctrlp#funky#id())
finally
if exists('default_input_save')
Expand Down Expand Up @@ -398,7 +397,7 @@ function! ctrlp#funky#accept(mode, str)
let bufnr = matchstr(a:str, ':\zs\d\+\ze:')
" should be current window = former window
let lnum = matchstr(a:str, '\d\+$')
execute 'noautocmd ' . get(s:, 'winnr', 1) . 'wincmd w'
execute 'noautocmd ' . get(g:, 'ctrlp_before_winnr', 1) . 'wincmd w'
call s:load_buffer_by_number(bufnr)
call cursor(lnum, 1)

Expand Down

0 comments on commit 17d1b6a

Please sign in to comment.