diff --git a/internal/action/tab.go b/internal/action/tab.go index b813c806..076df5f8 100644 --- a/internal/action/tab.go +++ b/internal/action/tab.go @@ -211,7 +211,7 @@ func InitTabs(bufs []*buffer.Buffer) { for _, b := range bufs[1:] { if multiopen == "vsplit" { MainTab().CurPane().VSplitBuf(b) - } else { // default hsplit + } else { // default hsplit MainTab().CurPane().HSplitBuf(b) } } diff --git a/internal/config/plugin.go b/internal/config/plugin.go index 200b2f54..eca46d9c 100644 --- a/internal/config/plugin.go +++ b/internal/config/plugin.go @@ -71,7 +71,7 @@ type Plugin struct { Info *PluginInfo // json file containing info Srcs []RuntimeFile // lua files Loaded bool - Default bool // pre-installed plugin + Default bool // pre-installed plugin } // IsLoaded returns if a plugin is enabled diff --git a/internal/display/softwrap.go b/internal/display/softwrap.go index 1abb9bf1..1460f883 100644 --- a/internal/display/softwrap.go +++ b/internal/display/softwrap.go @@ -291,7 +291,7 @@ func (w *BufWindow) diff(s1, s2 SLoc) int { // within the buffer boundaries. func (w *BufWindow) Scroll(s SLoc, n int) SLoc { if !w.Buf.Settings["softwrap"].(bool) { - s.Line = util.Clamp(s.Line + n, 0, w.Buf.LinesNum()-1) + s.Line = util.Clamp(s.Line+n, 0, w.Buf.LinesNum()-1) return s } return w.scroll(s, n) diff --git a/internal/display/tabwindow.go b/internal/display/tabwindow.go index 83d3e7de..844f12e9 100644 --- a/internal/display/tabwindow.go +++ b/internal/display/tabwindow.go @@ -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 @@ -147,15 +147,15 @@ 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) @@ -163,7 +163,7 @@ func (w *TabWindow) Display() { draw(' ', 1, false, tabCharHighlight) draw(' ', 2, false, globalTabReverse) } - + if x >= w.Width { break } diff --git a/pkg/highlight/highlighter.go b/pkg/highlight/highlighter.go index 5af97edc..a13a7261 100644 --- a/pkg/highlight/highlighter.go +++ b/pkg/highlight/highlighter.go @@ -162,7 +162,7 @@ func (h *Highlighter) highlightRegion(highlights LineMatch, start int, canMatchE if curRegion.group == curRegion.limitGroup || p.group == curRegion.limitGroup { matches := findAllIndex(p.regex, line) for _, m := range matches { - if ((endLoc == nil) || (m[0] < endLoc[0])) { + if (endLoc == nil) || (m[0] < endLoc[0]) { for i := m[0]; i < m[1]; i++ { fullHighlights[i] = p.group }