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

File statinfo not refreshed when using mark-load #1807

Closed
valoq opened this issue Oct 9, 2024 · 4 comments · Fixed by #1808
Closed

File statinfo not refreshed when using mark-load #1807

valoq opened this issue Oct 9, 2024 · 4 comments · Fixed by #1808

Comments

@valoq
Copy link
Contributor

valoq commented Oct 9, 2024

Related to #1536

The statinfo refresh is currently handled here

lf/app.go

Line 412 in 382095b

if app.ui.msgIsStat {

but when I use mark-load to change to a directory after receiving an error message, the statinfo is not refreshed and the error message persists until I change to another directory.

@joelim-work I noticed that msgIsStat is false when I use mark-load but I am not quite sure how to best address this.

@joelim-work
Copy link
Collaborator

app.ui.msgIsStat represents whether the statline actually displays file info or not. This is important so that other things like error messages do not get wiped out from asynchronous updates.

However I found that when changing to an empty directory (or a new directory that hasn't been loaded yet), the loadFileInfo function doesn't actually set app.ui.msgIsStat because there is no file to display information for. But I think this is incorrect since the old file info will remain - can you try #1808 to see if this fixes your issue?

@valoq
Copy link
Contributor Author

valoq commented Oct 9, 2024

Works as expected, thank you

@valoq
Copy link
Contributor Author

valoq commented Oct 9, 2024

A possibly related behavior can be observed when opening files after an error message:

  1. Trigger Error -> Error Message is displayed
  2. Open text file, then close the text file
  3. Error Message is still displayed

Not sure this is intended or another missing check.

@joelim-work
Copy link
Collaborator

This is a separate issue, can you try #1809 to see if it works?

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 a pull request may close this issue.

2 participants