-
Notifications
You must be signed in to change notification settings - Fork 327
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
Export user-options on change #1418
Conversation
The I guess you can try changing your config to have the keybinding set the user-defined option, and in addition export it by adding some dummy shell call (e.g. |
If one has an external previewer that uses an lf user-option (e.g. "preview-mode") and some key-kindings that change this user-option (e.g. to "hex", "simple", "fancy") and send a "reload" command to lf, then the expectation after pressing the keys is, that the prewiever is called with an updated value of the user-option. Though this did not happen since #1354, as this caused random crashes. This change exports user-defined options immediately when they are evaluated.
Ah, ok. Thanks.
You are right,
I tried, but didn't succeed. Maybe I got the syntax wrong.
That sounds nice. I've implemented this in the |
Thanks for revisiting this, The change looks fine to me, perhaps it might be better to leave a comment in the code to explain the purpose of doing this. I believe the original design of the I will leave this PR open for now, @gokcehan will want to review this and might even come up with another solution. BTW we are planning a new release soon, so if you're lucky this change can be squeezed in. |
Thanks. I've added an explaining comment. |
Thank you @raslop for the patch and @joelim-work for the review. I can't say I understand much about the usecase for this, but the change itself looks good to me. Even though we're currently in a feature-freeze for r31, I think it is better to merge this since I think this is somehow related to the previous change mentioned. I have tried to add this to the release notes in #1407. Let me know if there is a better wording for this change. |
Thanks a lot. |
@raslop I have now changed the notes accordingly. Thanks again. |
If one has an external previewer that uses an lf user-option (e.g. "preview-mode") and some key-kindings that change this user-option (e.g. to "hex", "simple", "fancy") and send a "reload" command to lf, then the expectation after pressing the keys is, that the prewiever is called with an updated value of the user-option. Though this did not happen before this change.