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

Update file info after reload command #1149

Merged
merged 2 commits into from Mar 12, 2023
Merged

Update file info after reload command #1149

merged 2 commits into from Mar 12, 2023

Conversation

joelim-work
Copy link
Collaborator

Fixes #1087

To reproduce the issue:

  1. Open lf and select a file
  2. Start a new terminal, and use chmod to change the file permissions
  3. Go back to lf and run the reload command

The current behaviour is that although reload does load the new file info (asynchronously), it isn't displayed because of the following condition:

lf/app.go

Lines 417 to 419 in 3fc1db5

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

It turns out that this code was added to display the file info when starting up, see #994. So just after the reload command, I clear app.ui.msg to create a similar situation.

I also considered just removing the if app.ui.msg == "" condition during the asynchronous reload, but that could cause issues like clearing out error messages at unexpected times.

@gokcehan
Copy link
Owner

@joelim-work Looks good, thanks for the patch.

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.

(BUG) The bottom status bar is not updated
2 participants