Skip to content

Commit

Permalink
tabwindow: gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKar committed Oct 25, 2024
1 parent 713c2f4 commit 536ad0a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/display/tabwindow.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package display

import (
runewidth "github.com/mattn/go-runewidth"
"github.com/zyedidia/tcell/v2"
"github.com/zyedidia/micro/v2/internal/buffer"
"github.com/zyedidia/micro/v2/internal/config"
"github.com/zyedidia/micro/v2/internal/screen"
"github.com/zyedidia/micro/v2/internal/util"
"github.com/zyedidia/tcell/v2"
)

type TabWindow struct {
Expand Down Expand Up @@ -112,10 +112,10 @@ func (w *TabWindow) Display() {
}
return tabBarStyle, tabBarActiveStyle
}

draw := func(r rune, n int, active bool, reversed bool) {
tabBarStyle, tabBarActiveStyle := reverseStyles(reversed)

style := tabBarStyle
if active {
style = tabBarActiveStyle
Expand Down Expand Up @@ -147,23 +147,23 @@ func (w *TabWindow) Display() {
} else {
draw(' ', 1, false, tabCharHighlight)
}

for _, c := range n {
draw(c, 1, i == w.active, tabCharHighlight)
}

if i == len(w.Names)-1 {
done = true
}

if i == w.active {
draw(']', 1, true, tabCharHighlight)
draw(' ', 2, true, globalTabReverse)
} else {
draw(' ', 1, false, tabCharHighlight)
draw(' ', 2, false, globalTabReverse)
}

if x >= w.Width {
break
}
Expand Down

0 comments on commit 536ad0a

Please sign in to comment.