Fix remaining gofmt complaints

This commit is contained in:
Dmytro Maluka 2025-03-24 23:04:06 +01:00
parent eadc402ae0
commit 948b05745f
5 changed files with 10 additions and 10 deletions

View File

@ -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)

View File

@ -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
} }