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

Improve refreshing of file statinfo #1536

Merged
merged 1 commit into from
Dec 26, 2023
Merged

Improve refreshing of file statinfo #1536

merged 1 commit into from
Dec 26, 2023

Conversation

joelim-work
Copy link
Collaborator

I have found a bug where the file statinfo doesn't update when using :cd to change to a new directory that has not already been loaded by lf. The issue happens because of the following check if app.ui.msg == "" which occurs when loading directories asynchronously:

lf/app.go

Lines 407 to 409 in d8b7df8

if app.ui.msg == "" {
app.ui.loadFileInfo(app.nav)
}

This check comes from #994, where the intention was that asynchronous reloads should update the file statinfo, but also not overwrite error messages.

I have added a new variable ui.msgIsStat to track whether the statline is showing file statinfo or an echo/echoerr message, and changed the check to use this variable instead, which should fix the above issue. This also means the workaround in #1149 is not needed anymore.

@gokcehan gokcehan merged commit 12ce649 into gokcehan:master Dec 26, 2023
4 checks passed
@joelim-work joelim-work deleted the ui-msg-update branch December 31, 2023 15:34
@gokcehan gokcehan mentioned this pull request Mar 31, 2024
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