blueyed / vim-diminactive

Vim plugin to dim inactive windows
339 stars 10 forks source link

ctrlp-funky messes up state #14

Open anstosa opened 9 years ago

anstosa commented 9 years ago

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 commented 9 years ago

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 https://github.com/tacahiroy/ctrlp-funky/commit/22a62c7cd8276bcc9ad324dbc51214e2533690b1 and was meant to address https://github.com/tacahiroy/ctrlp-funky/issues/54.

blueyed commented 9 years ago

This is similar to https://github.com/blueyed/vim-diminactive/issues/4.

blueyed commented 7 years ago

https://github.com/blueyed/vim-diminactive/issues/4 was fixed for fugitive. Any new insight on this issue?

blueyed commented 7 years ago

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

nkakouros commented 5 years ago

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

blueyed commented 5 years ago

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

nkakouros commented 4 years ago

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

nkakouros commented 4 years ago

@blueyed @anstosa This can be closed.