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

ctrlp-funky messes up state #14

Open
anstosa opened this issue May 26, 2015 · 8 comments
Open

ctrlp-funky messes up state #14

anstosa opened this issue May 26, 2015 · 8 comments

Comments

@anstosa
Copy link

anstosa commented May 26, 2015

I realize this is a third party compatibility issue and not your problem, but I'm hoping you can shed some light on what's happening since I'm not familiar with vimscript.

When I trigger ctrlp-funky, it opens in a new horizontal split at the bottom of the window and the previous current pane dims. That much is expected. However when I select something in the ctrlp split, it scrolls to the position on my previous split and closes itself. At this point all the splits are dimmed. I would expect the previous split to not be dim. If I run :DimInactive, the state fixes itself.

Thanks for any insight you might be able to provide.

@blueyed
Copy link
Owner

blueyed commented May 31, 2015

There's likely some autocommand missing, maybe this is causing it:

function! ctrlp#funky#accept(mode, str)
  " always back to former window
  call ctrlp#exit()

  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'
  call s:load_buffer_by_number(bufnr)
  call cursor(lnum, 1)

  call s:after_jump()

  if !s:sort_by_mru | return | endif

  call s:mru.prioritise(bufnr, s:definition(a:str))
endfunction

https://github.com/tacahiroy/ctrlp-funky/blob/59b004de84358e249029fa982f149c4bc8089c58/autoload/ctrlp/funky.vim#L348

Try removing the noautocmd from there.

It was changed/added in tacahiroy/ctrlp-funky@22a62c7 and was meant to address tacahiroy/ctrlp-funky#54.

@blueyed
Copy link
Owner

blueyed commented May 31, 2015

This is similar to #4.

@blueyed
Copy link
Owner

blueyed commented May 12, 2017

#4 was fixed for fugitive.
Any new insight on this issue?

@blueyed
Copy link
Owner

blueyed commented May 12, 2017

I think it would be great to make it more robust, but then a test case to reproduce it is necessary after all.

@nkakouros
Copy link

This issue still persists. I completely commented out the noautocmd line you mention above but it didn't help.

@blueyed
Copy link
Owner

blueyed commented Feb 25, 2019

@tterranigma
I have no interest in debugging this myself, so you would have to investigate yourself.

@nkakouros
Copy link

nkakouros commented Mar 19, 2020

I have fixed this issue here. This can be closed I think.

@nkakouros
Copy link

@blueyed @anstosa This can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants