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

Unexpected behaviour when using ctrlp from a dirvish buffer #43

Closed
qstrahl opened this issue Apr 18, 2016 · 2 comments
Closed

Unexpected behaviour when using ctrlp from a dirvish buffer #43

qstrahl opened this issue Apr 18, 2016 · 2 comments
Labels

Comments

@qstrahl
Copy link

qstrahl commented Apr 18, 2016

When invoking ctrlp from a dirvish buffer, it opens the selected file in a split rather than replacing the dirvish buffer. This is with default ctrlp settings.

@justinmk justinmk added the bug label Apr 18, 2016
@justinmk justinmk added invalid and removed bug labels Apr 25, 2016
@justinmk
Copy link
Owner

justinmk commented Apr 25, 2016

@qstrahl Repro'd. CtrlP does this for any non-empty 'buftype' except for "terminal". netrw does not set buftype=nofile, which is somehow not surprising.

buftype=nofile is the right thing to do for a directory browser, so CtrlP should find a better heuristic. I get the idea of not wanting to replace quickfix and help buffers, but the logic is too far-reaching beyond that.

This looks like the relevant line: https://github.com/ctrlpvim/ctrlp.vim/blob/dfd357ca9d8459a604ca26d3bb1f896b26398824/autoload/ctrlp.vim#L1746

@qstrahl
Copy link
Author

qstrahl commented Apr 26, 2016

Thanks for the detective work, @justinmk!

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

No branches or pull requests

2 participants