+ globalTabReverse := config.GetGlobalOption("tabreverse").(bool)
+ globalTabHighlight := config.GetGlobalOption("tabhighlight").(bool)
+
+ // xor of reverse and tab highlight to get tab character (as in filename and surrounding characters) reverse state
+ tabCharHighlight := (globalTabReverse || globalTabHighlight) && !(globalTabReverse && globalTabHighlight)
+
+ reverseStyles := func(reverse bool) (tcell.Style, tcell.Style) {
+ tabBarStyle := config.DefStyle.Reverse(reverse)
+ if style, ok := config.Colorscheme["tabbar"]; ok {
+ tabBarStyle = style
+ }
+ tabBarActiveStyle := tabBarStyle
+ if style, ok := config.Colorscheme["tabbar.active"]; ok {
+ tabBarActiveStyle = style
+ }
+ return tabBarStyle, tabBarActiveStyle
+ }
+
+ draw := func(r rune, n int, active bool, reversed bool) {
+ tabBarStyle, tabBarActiveStyle := reverseStyles(reversed)
+
+ style := tabBarStyle
+ if active {
+ style = tabBarActiveStyle
+ }