Skip to content

Misc improvements for nav.checkDir#2050

Merged
joelim-work merged 3 commits into
gokcehan:masterfrom
joelim-work:improve-checkdir
Jul 19, 2025
Merged

Misc improvements for nav.checkDir#2050
joelim-work merged 3 commits into
gokcehan:masterfrom
joelim-work:improve-checkdir

Conversation

@joelim-work

@joelim-work joelim-work commented Jul 19, 2025

Copy link
Copy Markdown
Collaborator

Changes:

  • When loading directories internally, they are no longer sorted because it will be done anyway when processing the update from app.nav.dirChan.
  • When loading directories internally, the ind and pos values are no longer set to 0 because that is the default value anyway.
  • nav.checkDir now exits early if the directory is already loading - the purpose of the function is to check if the directory needs reloading, and trigger one if so.
  • The directory loadTime is now only set when the directory has actually been loaded. Originally loadTime was also set immediately before triggering a reload, to prevent additional attempts to reload the directory when it is already in progress, but this should be taken care of by the loading check above.

This is also fixes a bug when dircache is disabled:

  • Start lf with set dircache false
  • Modify the directory by creating a file (e.g. $touch file)
  • The directory is reloaded with the new file but the files are not sorted

@joelim-work joelim-work merged commit 93400c1 into gokcehan:master Jul 19, 2025
4 checks passed
@joelim-work joelim-work deleted the improve-checkdir branch July 19, 2025 06:04
@joelim-work joelim-work added the fix Pull requests that fix existing behavior label Jul 19, 2025
@joelim-work joelim-work added this to the r37 milestone Jul 19, 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