Skip to content

How to detect that the preview mode is enabled? #535

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

Closed
nyngwang opened this issue Sep 21, 2022 · 3 comments
Closed

How to detect that the preview mode is enabled? #535

nyngwang opened this issue Sep 21, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@nyngwang
Copy link

I want to customize the <Esc> mappings on filesystem source so that when the preview mode is enabled, it will do toggle_preview to disable the preview. But when preview mode is not enabled, the neo-tree will get closed. So, as title.

@cseickel
Copy link
Contributor

There is not a way to know at the moment, but I can add one.

@cseickel cseickel added the enhancement New feature or request label Sep 21, 2022
@nyngwang
Copy link
Author

Is that require('neo-tree.sources.common.preview').is_active() really a right way to do this? (I'm using it and you might have seen it from my comment on some other issue.)

@cseickel
Copy link
Contributor

Yes it is. It has not been released yet though, it is still in main.

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

No branches or pull requests

2 participants