You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Often I'd like to take a peek at an implementation, and close the opened floating window from goto-preview when I don't have it focused anymore. It would be great if unfocusing it could close it automatically.
Describe the solution you'd like
An option in the config to close floating buffers when leaving focus.
Describe alternatives you've considered
I've tried implementing it myself using the post_open_hook, but I didn't manage to get a working solution.
@Leandros try to return true from your callback. It should delete autocmd.
And also, I think it's useful to mark the buffer as nomodifiable in the preview window. Together with closing the preview window on WinLeave event, it works well for me:
@vladimir-popov's solution is the way to go. The current ergonomics of goto-preview are exactly how I want them to be for my use-case. Hooks are provided so everyone else can implement their own flavour of behaviours. An idea would be to add community hooks to the repo that are maintained by the community that can be more easily set than copying over hook implementations all over. I'll give this some more thought
Is your feature request related to a problem? Please describe.
Often I'd like to take a peek at an implementation, and close the opened floating window from
goto-preview
when I don't have it focused anymore. It would be great if unfocusing it could close it automatically.Describe the solution you'd like
An option in the config to close floating buffers when leaving focus.
Describe alternatives you've considered
I've tried implementing it myself using the
post_open_hook
, but I didn't manage to get a working solution.Thank you!
The text was updated successfully, but these errors were encountered: