-
Notifications
You must be signed in to change notification settings - Fork 321
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
(BUG) The bottom status bar is not updated #1087
Comments
Maybe this works for you:
I have no clue why two separate reload commands work. |
Working great, thank u! |
Name of the function does not allow use of spaces but you could use non-breaking space instead. So using |
Ohh, working, thank you! :) |
Maybe this one needs to be reopened since calling same command twice in a row does not sound OK to me. |
Okay, reopened. |
These are even simpler steps:
Actual result: Date modified is the same. Only after second reload file information is updated in status bar. Expected result: Only one reload should be required to fully reload status bar, preview and file colors. |
Hi @DusanLesan , I believe I have found the issue. Below is an explanation of what is happening.
I think in order to solve this, we would have to either:
|
@joelim-work Thank you for investigating this issue. I am sure it will help someone in fixing it. |
@DusanLesan Would you by any chance be able to test the suggested changes to see if it fixes the issue? If it works for you, I wouldn't mind submitting a pull request for this (most likely the second approach). |
@joelim-work I would be ok with that if you give me a patch with changes. You can start with second one if you prefer it. Also, let me know if other features could be affected so I could try them too. |
Hi @DusanLesan Here you go, apologies in advance for the large wall of text that follows 😛 Solution 1:
Checkout this branch: https://github.com/joelim-work/lf/tree/reload-status-bar-1 --- a/app.go
+++ b/app.go
@@ -414,9 +414,7 @@ func (app *app) loop() {
if err == nil {
if d.path == app.nav.currDir().path {
app.ui.loadFile(app, true)
- if app.ui.msg == "" {
- app.ui.loadFileInfo(app.nav)
- }
+ app.ui.loadFileInfo(app.nav)
}
if d.path == curr.path {
app.ui.dirPrev = d I have found that removing the
Solution 2:
Checkout this branch: https://github.com/joelim-work/lf/tree/reload-status-bar-2 --- a/eval.go
+++ b/eval.go
@@ -1312,7 +1312,7 @@ func (e *callExpr) eval(app *app, args []string) {
app.ui.echoerrf("reload: %s", err)
}
app.ui.loadFile(app, true)
- app.ui.loadFileInfo(app.nav)
+ app.ui.msg = ""
case "read":
if app.ui.cmdPrefix == ">" {
return This approach keeps the |
@joelim-work I have made comparison between reload-status-bar-1 (S1), reload-status-bar-2 (S2) and master on your repo and it looks to me that S1 covers most cases. Please confirm if that looks ok to you and if you need me to further explain taken actions
|
Hi @DusanLesan, that is a lot of test cases - thanks for your help. The main reason why I didn't like Solution 1 was because of the The difference between Anyway, based on your testing do you think Solution 1 or 2 (preferably 2) solves the original issue? Or is there anything that you think needs addressing? |
Yes. Both of them address all the reload cases I could think of, so you can use whichever one you prefer. |
The authorization list of files and directories does not change, even if I use the reload command. Here is the example command I created:
Even if I use the reload command, the lower status shows the old authorization, while the color of the file changes according to the authorization. If I move the cursor back and forth, the authorization display on the lower status bar is also updated.
The text was updated successfully, but these errors were encountered: