Skip to content

Conversation

@joelim-work
Copy link
Collaborator

Extremely large refactor:

  • Remove nav.dirs, which stores dir objects separately from the directory cache, and can cause confusion. Now all dir objects will be stored in only the directory cache, and looked up when required.
  • Remove the nav.init flag. This was previously used to ensure that nav.dirs was not being accessed if it was empty (i.e. before initialization).
  • Functions like currDir and currFile now load directories from the system if they are not present in the cache, so that they always return something.

Hopefully this doesn't cause any crashes or other regressions. It is a very large change though so it could take some time to become stable.

@joelim-work joelim-work marked this pull request as ready for review December 23, 2025 13:11
@joelim-work
Copy link
Collaborator Author

Hi @CatsDeservePets, did you have any other comments about this PR, or did you want some more time to test the changes?

@CatsDeservePets
Copy link
Collaborator

Hi @CatsDeservePets, did you have any other comments about this PR, or did you want some more time to test the changes?

I will test it some more.

@CatsDeservePets
Copy link
Collaborator

Sorry for taking so long. I could not find any more obvious issues and had either the same or "improved" behaviour when compared to the older code.

The only thing that might be confusing is the difference in wording for some error messages.
lf -command ":rename" -> rename: empty directory
lf -command ":copy" -> copy: no file selected
lf -command ":delete" -> delete: no file selected

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.

2 participants