-
Notifications
You must be signed in to change notification settings - Fork 136
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
feat: do not close preview when cd into dir #277
feat: do not close preview when cd into dir #277
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting up a PR! Left some comments about a few things to explore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it out and it's looking good! Just one small bug to fix and one question
lua/oil/init.lua
Outdated
|
||
if not opts.preview and preview_win and entry_is_file then | ||
vim.api.nvim_win_close(preview_win, true) | ||
vim.api.nvim_set_current_win(prev_win) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line necessary? Is it possible that the cursor has changed windows between line 533 and here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, yeah I think we can remove that line — the only case where the current window changes is if opts.preview
Sweet, pushed the changes! Also, is this also happening on your end? |
I'm not seeing that issue. It looks to me like the conceallevel isn't being set? Possibly something is interfering with the window options. If you can get a repro LMK and I might be able to look into it. Thanks for working with me on the PR! I think this is a great addition to oil. |
@stevearc @lucaseras I also just tried this out and I do get that bug that was mentioned with the entry ids appearing. It seems to only appear on the current line and doesn't happen for every folder. Still working on reproducing in a minimal environment, but just wanted to give a heads up that something is going on here. It looks like |
Ah I can replicate it extremely easily. Opened a new issue! #287 |
Implements #236
Hi there! I'm a first-timer in this repo, so apologies in advance if I've missed any process for contributing
This setup has been working locally for me, so I decided to push up for some feedback, thanks in advance!
Also happy to add this to config, in case people would rather keep the existing behavior