Ranger: Saved tabs do not show contents on starting in viewmode multipane

Created on 2 Aug 2020  路  3Comments  路  Source: ranger/ranger

Runtime Environment

  • Operating system and version: Manjaro 20.0.3
  • Terminal emulator and version: xfce4-terminal 0.8.9.2
  • Python version: 3.8.3 (default, May 17 2020, 18:15:42) [GCC 10.1.0]
  • Ranger version/commit: ranger-master
  • Locale: en_AU.UTF-8

Current Behavior

With save_tabs_on_exit true and viewmode multipane, on opening ranger with saved tabs, the multipane browser lays out the space for each required tab, but only the first tab is populated with directory contents.

Expected Behavior

All saved tabs display their directory contents on launch

Context

It's an annoying delay while I tab through each of the tabs to get them activated.

Possible Solutions

Presumably ViewMultipane's __init__() method needs some additional code to draw all tabs, rather than just main_column.

Steps to reproduce

  1. Set ~/.config/ranger/rc.conf settings save_tabs_on_exit true and viewmode multipane
  2. open ranger, open a second tab and exit with "Q"
  3. re-open ranger. a new tab for the current directory is populated and the two saved tabs have space allocated but no contents.
bug help-wanted

All 3 comments

A couple of points:

  • Populating all the tabs could be a significant performance hit on loading. Would be best to have an option restore_saved_tabs_on load to trigger a tab_restore on all tabs when loading, and make this option off by default
  • Another idea might be to limit the number of visible tabs. Is it really ideal to have multipane browser tabs mapping one-to-one with file manager tabs? It's possible to have hundreds of tabs open, but having that many panes open in a multipane browser is rarely going to be useful. If we detach panes from tabs, we would need a separate mechanism for switching panes and switching tabs per pane.

An addition to the second point. It could be a sliding window of a fixed width, every time switching tabs would leave the window you shift it minimally, e.g., 1, | 2, 3, 4 |, 5, 6 --go to 6-> 1, 2, 3, | 4, 5, 6 |.

It could be a sliding window of a fixed width, every time switching tabs would leave the window you shift it minimally

That would avoid the need for a tab - pane binding interface. There's another issue I'll document later that would need to be fixed in that case - changing tab order is not reflected in pane order, currently.

Would probably be good to add a "visible" highlight level in the tab list, too. Or, since the active pane is already highlighted in the browser, just turn the tab list highlight for "active tab" into "visible tabs" overall. Wouldn't change the behaviour of miller mode.

Was this page helpful?
0 / 5 - 0 ratings