mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-18 06:45:40 -04:00
Fix remaining gofmt complaints
This commit is contained in:
parent
eadc402ae0
commit
948b05745f
@ -211,7 +211,7 @@ func InitTabs(bufs []*buffer.Buffer) {
|
|||||||
for _, b := range bufs[1:] {
|
for _, b := range bufs[1:] {
|
||||||
if multiopen == "vsplit" {
|
if multiopen == "vsplit" {
|
||||||
MainTab().CurPane().VSplitBuf(b)
|
MainTab().CurPane().VSplitBuf(b)
|
||||||
} else { // default hsplit
|
} else { // default hsplit
|
||||||
MainTab().CurPane().HSplitBuf(b)
|
MainTab().CurPane().HSplitBuf(b)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ type Plugin struct {
|
|||||||
Info *PluginInfo // json file containing info
|
Info *PluginInfo // json file containing info
|
||||||
Srcs []RuntimeFile // lua files
|
Srcs []RuntimeFile // lua files
|
||||||
Loaded bool
|
Loaded bool
|
||||||
Default bool // pre-installed plugin
|
Default bool // pre-installed plugin
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsLoaded returns if a plugin is enabled
|
// IsLoaded returns if a plugin is enabled
|
||||||
|
@ -291,7 +291,7 @@ func (w *BufWindow) diff(s1, s2 SLoc) int {
|
|||||||
// within the buffer boundaries.
|
// within the buffer boundaries.
|
||||||
func (w *BufWindow) Scroll(s SLoc, n int) SLoc {
|
func (w *BufWindow) Scroll(s SLoc, n int) SLoc {
|
||||||
if !w.Buf.Settings["softwrap"].(bool) {
|
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 s
|
||||||
}
|
}
|
||||||
return w.scroll(s, n)
|
return w.scroll(s, n)
|
||||||
|
@ -112,10 +112,10 @@ func (w *TabWindow) Display() {
|
|||||||
}
|
}
|
||||||
return tabBarStyle, tabBarActiveStyle
|
return tabBarStyle, tabBarActiveStyle
|
||||||
}
|
}
|
||||||
|
|
||||||
draw := func(r rune, n int, active bool, reversed bool) {
|
draw := func(r rune, n int, active bool, reversed bool) {
|
||||||
tabBarStyle, tabBarActiveStyle := reverseStyles(reversed)
|
tabBarStyle, tabBarActiveStyle := reverseStyles(reversed)
|
||||||
|
|
||||||
style := tabBarStyle
|
style := tabBarStyle
|
||||||
if active {
|
if active {
|
||||||
style = tabBarActiveStyle
|
style = tabBarActiveStyle
|
||||||
@ -147,15 +147,15 @@ func (w *TabWindow) Display() {
|
|||||||
} else {
|
} else {
|
||||||
draw(' ', 1, false, tabCharHighlight)
|
draw(' ', 1, false, tabCharHighlight)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, c := range n {
|
for _, c := range n {
|
||||||
draw(c, 1, i == w.active, tabCharHighlight)
|
draw(c, 1, i == w.active, tabCharHighlight)
|
||||||
}
|
}
|
||||||
|
|
||||||
if i == len(w.Names)-1 {
|
if i == len(w.Names)-1 {
|
||||||
done = true
|
done = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if i == w.active {
|
if i == w.active {
|
||||||
draw(']', 1, true, tabCharHighlight)
|
draw(']', 1, true, tabCharHighlight)
|
||||||
draw(' ', 2, true, globalTabReverse)
|
draw(' ', 2, true, globalTabReverse)
|
||||||
@ -163,7 +163,7 @@ func (w *TabWindow) Display() {
|
|||||||
draw(' ', 1, false, tabCharHighlight)
|
draw(' ', 1, false, tabCharHighlight)
|
||||||
draw(' ', 2, false, globalTabReverse)
|
draw(' ', 2, false, globalTabReverse)
|
||||||
}
|
}
|
||||||
|
|
||||||
if x >= w.Width {
|
if x >= w.Width {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ func (h *Highlighter) highlightRegion(highlights LineMatch, start int, canMatchE
|
|||||||
if curRegion.group == curRegion.limitGroup || p.group == curRegion.limitGroup {
|
if curRegion.group == curRegion.limitGroup || p.group == curRegion.limitGroup {
|
||||||
matches := findAllIndex(p.regex, line)
|
matches := findAllIndex(p.regex, line)
|
||||||
for _, m := range matches {
|
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++ {
|
for i := m[0]; i < m[1]; i++ {
|
||||||
fullHighlights[i] = p.group
|
fullHighlights[i] = p.group
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user