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
Test for and follow tab changes in multipane mode #2061
Conversation
The statusbar is still not updating when reverting from multipane to miller mode. I would apreciate some advice on fixing that; otherwise, I will dive into the issue when I next have free time. |
I think the |
Doesn't Ah, I'm thinking we need another set of tests on viewmode[0] to check that |
Status bar is now updating correctly on all mode changes and tab changes by my testing. |
|
It does pick up the change. Closing the open tab forces a |
Some quick grepping seems to indicate no though? I can't find the |
…s/ranger into fix/1880-multipane-status
Ok, it will now catch |
Hmm, is there a way to coalesce these signals? You could be causing quite a lot of redrawn the way it is right now. |
That's why I was hesitant to include |
How much trouble is adding a new signal? Would it be better to add a |
I really think layoutchange is supposed to be that signal. Which occurences of |
Does simply switching the active tab in multipane mode trigger a |
In ViewMultipane, |
Binding only to I'm not sure exactly which actions are being called in order to make that happen. We should probably trigger a |
Or maybe, if we open in multi-pane mode with remembered tabs, we should actually make all the tabs visible? |
I think I agree that all the tabs should be visible when opening with remembered tabs in multipane. (This does have performance implications of course, we normally load tabs lazily to avoid exactly this.) A config option limiting the number of open panes in the multipane mode seems desirable. |
Checking with a debugger, with the code as it is in this PR (binding to both
|
I think |
I suppose the reason it doesn't is that the layout of the multipane doesn't change, merely the contents of one pane. What's wrong with binding to both signals? I'd rather not mess with the signal emits, since they are used elsewhere. |
Looks to me like it recreates a tab? That adds a tab no? Which changes the layout, just like |
Seems to me that redesigning the signalling of tab adjustments is outside the scope of this PR, which is tightly focused on getting the status bar to pay attention to those adjustments when they happen. Can we raise a different issue for a review of tab signalling? |
A different PR is fine. I consider it a bug that something which affects the tabs the same way |
|
Ah, perfect, thanks for looking into it. Then we can drop listening to |
I'd really love to have this merged. The messed up status bar is a real nuisance. |
Thanks for the ping, I'd lost track of this one. |
Hmm, I was looking into this to merge it but I can't reproduce the problem. I open a couple tabs in multipane viewmode and select different files in each of them. The statusbar changes permissions and date when changing tabs. |
It only goes wrong when you change to a different directory while in multipane mode. And then, once it's disconnected, even switching back to single pane mode is still messed up. Once it disconnects, the status bar is locked to that specific directory. |
Disconnects? So it only works for networked directories? |
I mean the status bar is disconnected from the active pane. It is not responsive to the current selection. I don't think there is any distinction between folders that are part of networked directories, is there? I don't know why ranger would care whether a file system is local or networked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the video, very clear explanation!
LGTM 👍
ISSUE TYPE
RUNTIME ENVIRONMENT
CHECKLIST
CONTRIBUTING
document has been read [REQUIRED]DESCRIPTION
Bound
tab.change
andsetopt.viewmode
signals to StatusBar widgetrequest_redraw
Added a new test to
def draw()
that enforces current column to match browsermain_column
MOTIVATION AND CONTEXT
Solves the bug of the Status bar getting locked to an old directory when switching tabs in multipane mode and on returning to miller mode.
TESTING
Ran all existing tests successfully.
This only affects the statusbar when multipane mode is used.