Commit cbc40417 authored by mathieui's avatar mathieui

fix: composing indicators not showing (fix #3527)

the fact this even worked in vertical mode was only due to a theming
edge case.
parent f1f1ccd5
Pipeline #3893 passed with stages
in 7 minutes and 36 seconds
...@@ -181,6 +181,10 @@ class Tab: ...@@ -181,6 +181,10 @@ class Tab:
def vertical_color(self): def vertical_color(self):
return VERTICAL_STATE_COLORS[self._state]() return VERTICAL_STATE_COLORS[self._state]()
@property
def priority(self) -> Union[int, float]:
return STATE_PRIORITY.get(self._state, -1)
@property @property
def state(self) -> str: def state(self) -> str:
return self._state return self._state
......
...@@ -18,6 +18,7 @@ from poezio.common import unique_prefix_of ...@@ -18,6 +18,7 @@ from poezio.common import unique_prefix_of
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
class GlobalInfoBar(Win): class GlobalInfoBar(Win):
__slots__ = ('core') __slots__ = ('core')
...@@ -69,7 +70,8 @@ class GlobalInfoBar(Win): ...@@ -69,7 +70,8 @@ class GlobalInfoBar(Win):
if not tab: if not tab:
continue continue
color = tab.color color = tab.color
if not show_inactive and color is theme.COLOR_TAB_NORMAL: if not show_inactive and color is theme.COLOR_TAB_NORMAL and (
tab.priority < 0):
continue continue
try: try:
if show_nums or not show_names: if show_nums or not show_names:
...@@ -114,7 +116,10 @@ class VerticalGlobalInfoBar(Win): ...@@ -114,7 +116,10 @@ class VerticalGlobalInfoBar(Win):
if not config.getbool('show_inactive_tabs'): if not config.getbool('show_inactive_tabs'):
sorted_tabs = [ sorted_tabs = [
tab for tab in sorted_tabs tab for tab in sorted_tabs
if tab.vertical_color != theme.COLOR_VERTICAL_TAB_NORMAL if (
tab.vertical_color != theme.COLOR_VERTICAL_TAB_NORMAL or
tab.priority > 0
)
] ]
nb_tabs = len(sorted_tabs) nb_tabs = len(sorted_tabs)
use_nicks = config.getbool('use_tab_nicks') use_nicks = config.getbool('use_tab_nicks')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment