Skip to content

Simpler implementation of dirpreviews #1958

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

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

joelim-work
Copy link
Collaborator

From discussion in #1949 (comment)

This is a rewrite of the dirpreviews feature, which was originally implemented in #842. This has a number of improvements:

  • The original channel/goroutine for handling file previews is now used for directory previews as well, instead of creating a new dedicated channel and goroutine just to handle directory previews.
  • The code for handling previews is now no longer duplicated as a result of the above, which makes maintenance easier
  • The loading property of a dir struct now properly indicates whether it has been read from the filesystem, and is not confused with whether its preview has loaded or not.

For the purposes of release notes, technically there is a bug fix in this change:

  • The previewer script is now only invoked for the current directory (not all directories), when starting lf with dirpreviews enabled.

@joelim-work joelim-work merged commit 0df0c0f into gokcehan:master Apr 10, 2025
4 checks passed
@joelim-work joelim-work deleted the dirpreviews-rewrite branch April 10, 2025 05:34
@joelim-work joelim-work added the fix Pull requests that fix existing behavior label Apr 10, 2025
@joelim-work joelim-work added this to the r35 milestone Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Pull requests that fix existing behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant