Skip to content
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

Remove environment exports from preview thread #1354

Merged
merged 1 commit into from Jul 27, 2023

Conversation

joelim-work
Copy link
Collaborator

Pass the next file to be previewed directly to the cleaner program instead of using environment variable exports, which is not thread-safe. This can be accessed using $6 instead of $f, should be labelled as a breaking change.

Exporting the options is also removed - the initial motivation was to use the ratios setting to determine the width of the preview, see #468 for more details. At that time, only the height was passed to the previewer program, see the diff. However this is no longer required as the preview dimensions are now passed as of #531.

@joelim-work joelim-work merged commit 2620f49 into gokcehan:master Jul 27, 2023
4 checks passed
@joelim-work joelim-work deleted the remove-preview-exports branch July 27, 2023 00:09
gokcehan pushed a commit that referenced this pull request Sep 11, 2023
* Export user-options when they are evaluated

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.

* Fix: Add explaining comment
@gokcehan gokcehan mentioned this pull request Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Random crash deleting selected files
2 participants