diff options
author | mathieui <mathieui@mathieui.net> | 2021-04-16 19:41:03 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-04-16 19:41:03 +0200 |
commit | cbc4041746daed2151ec6637a22fae9724e24818 (patch) | |
tree | 1391255ba5c26d94c4ded4d09801a15b8e863a49 | |
parent | f1f1ccd5063ca12a4c6a1a5631ee511331e882fe (diff) | |
download | poezio-cbc4041746daed2151ec6637a22fae9724e24818.tar.gz poezio-cbc4041746daed2151ec6637a22fae9724e24818.tar.bz2 poezio-cbc4041746daed2151ec6637a22fae9724e24818.tar.xz poezio-cbc4041746daed2151ec6637a22fae9724e24818.zip |
fix: composing indicators not showing (fix #3527)
the fact this even worked in vertical mode was only due to a theming
edge case.
-rw-r--r-- | poezio/tabs/basetabs.py | 4 | ||||
-rw-r--r-- | poezio/windows/info_bar.py | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py index 7ee8ff17..43ab237f 100644 --- a/poezio/tabs/basetabs.py +++ b/poezio/tabs/basetabs.py @@ -182,6 +182,10 @@ class Tab: return VERTICAL_STATE_COLORS[self._state]() @property + def priority(self) -> Union[int, float]: + return STATE_PRIORITY.get(self._state, -1) + + @property def state(self) -> str: return self._state diff --git a/poezio/windows/info_bar.py b/poezio/windows/info_bar.py index 8fb34d91..67b68888 100644 --- a/poezio/windows/info_bar.py +++ b/poezio/windows/info_bar.py @@ -18,6 +18,7 @@ from poezio.common import unique_prefix_of log = logging.getLogger(__name__) + class GlobalInfoBar(Win): __slots__ = ('core') @@ -69,7 +70,8 @@ class GlobalInfoBar(Win): if not tab: continue 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 try: if show_nums or not show_names: @@ -114,7 +116,10 @@ class VerticalGlobalInfoBar(Win): if not config.getbool('show_inactive_tabs'): 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) use_nicks = config.getbool('use_tab_nicks') |