Turn on/off highlighting of the underline depending on tabs

This commit is contained in:
Dave Pearson 2023-06-15 10:28:50 +01:00
parent 6f03566090
commit 4af0f8304f
No known key found for this signature in database
GPG key ID: B413E0EF113D4ABF

View file

@ -510,9 +510,11 @@ class Tabs(Widget, can_focus=True):
try:
active_tab = self.query_one(f"#tabs-list > Tab.-active")
except NoMatches:
underline.show_highlight = False
underline.highlight_start = 0
underline.highlight_end = 0
else:
underline.show_highlight = True
tab_region = active_tab.virtual_region.shrink(active_tab.styles.gutter)
start, end = tab_region.column_span
if animate: