From 5674dc5bfc97efdf9cdf1df3f90fb8abe39632e1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 2 Jun 2018 20:24:37 +0530 Subject: [PATCH] ... --- kitty/tab_bar.py | 7 ++++++- kitty/tabs.py | 5 ++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/kitty/tab_bar.py b/kitty/tab_bar.py index 902bef7ed..0b3035c7a 100644 --- a/kitty/tab_bar.py +++ b/kitty/tab_bar.py @@ -2,15 +2,20 @@ # vim:fileencoding=utf-8 # License: GPL v3 Copyright: 2018, Kovid Goyal +from collections import namedtuple + from .config import build_ansi_color_table from .constants import WindowGeometry from .fast_data_types import ( - DECAWM, Screen, cell_size_for_window, pt_to_px, viewport_for_window, set_tab_bar_render_data + DECAWM, Screen, cell_size_for_window, pt_to_px, set_tab_bar_render_data, + viewport_for_window ) from .layout import Rect from .utils import color_as_int from .window import calculate_gl_geometry +TabBarData = namedtuple('TabBarData', 'title is_active is_last needs_attention') + class TabBar: diff --git a/kitty/tabs.py b/kitty/tabs.py index 31c7a5326..865761726 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -16,11 +16,10 @@ from .fast_data_types import ( ) from .layout import create_layout_object_for, evict_cached_layouts from .session import resolved_shell -from .tab_bar import TabBar +from .tab_bar import TabBar, TabBarData from .utils import log_error from .window import Window -TabbarData = namedtuple('TabbarData', 'title is_active is_last needs_attention') SpecialWindowInstance = namedtuple('SpecialWindow', 'cmd stdin override_title cwd_from cwd overlay_for env') @@ -474,7 +473,7 @@ class TabManager: # {{{ if w.needs_attention: needs_attention = True break - ans.append(TabbarData(title, t is at, t is self.tabs[-1], needs_attention)) + ans.append(TabBarData(title, t is at, t is self.tabs[-1], needs_attention)) return ans def activate_tab_at(self, x):