ctrlp-funky icon indicating copy to clipboard operation
ctrlp-funky copied to clipboard

:CtrlPFunky always selects changes top split

Open axelson opened this issue 11 years ago • 6 comments

Steps to reproduce:

  1. open a file in vim
  2. :sp to do a horizontal split
  3. ctrl-w j to move to bottom split
  4. :CtrlPFunky and select a function

Expected: CtrlPFunky to show the function in the bottom split What actually happens: CtrlPFunky shows the function in the top split

Is this expected behavior? It throws me off when it happens. Also a similar issue happens for vertical splits.

axelson avatar Oct 21 '14 20:10 axelson

hmm - that is not expected behaviour. However, I don't reproduce the problem. I've tested with like this small vimrc.

set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#rc()
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'tacahiroy/ctrlp-funky'
call vundle#end()
filetype plugin indent on
let g:ctrlp_extensions = ['funky']

And step is like this:

  1. % vim -u vimrc.mini ~/.vimrc
  2. :sp ~/.zshrc
  3. <C-w>j
  4. :CtrlPFunky

tacahiroy avatar Oct 24 '14 11:10 tacahiroy

I am still able to reproduce it with that vimrc. I think the difference is our step #2's are different. I am just using :sp so I can have a split of the same exact file, whereas you are splitting a different file.

axelson avatar Oct 24 '14 22:10 axelson

i see. So the problem is the active window is changed to top one, isn't it? I've reproduced the problem and it's a bug. will fix soon.

tacahiroy avatar Oct 25 '14 08:10 tacahiroy

Yes, that is exactly it. Thanks for the awesome plug-in and I'm looking forward to the fix!

axelson avatar Oct 25 '14 09:10 axelson

I've just fixed the issue, it's kinda halfway fix though. If you press Enter, it'll behave correctly. The remaining problem is behaviour on cancel (= press <Esc>).

will continue to investigate this.

tacahiroy avatar Oct 25 '14 10:10 tacahiroy

Wow, I didn't even realize that the cancel behavior was broken. The 'enter' case works great for me now with your latest fix. Thanks!

On Sat Oct 25 2014 at 12:21:52 AM tacahiroy [email protected] wrote:

I've just fixed the issue, it's kinda halfway fix though. If you press Enter, it'll behave correctly. The remaining problem is behaviour on cancel (= press ).

will continue to investigate this.

— Reply to this email directly or view it on GitHub https://github.com/tacahiroy/ctrlp-funky/issues/54#issuecomment-60478218 .

axelson avatar Oct 25 '14 18:10 axelson