stevearc / oil.nvim

Neovim file explorer: edit your filesystem like a buffer
MIT License
3.84k stars 110 forks source link

fix: close preview window when leaving oil buffer #296

Closed lucaseras closed 7 months ago

lucaseras commented 8 months ago

Fixes https://github.com/stevearc/oil.nvim/issues/295. Closing the preview window only when selecting an entry is not broad enough to handle when we change the buffer for some other reason (e.g. when doing :edit)

stevearc commented 7 months ago

@lucaseras I fiddled with it a bit and tried a slightly different approach. See how that works for you

lucaseras commented 7 months ago

I like the new approach, thank you! I tested it locally and worked nicely