diff --git a/cmd/micro/actions.go b/cmd/micro/actions.go index dc61c685..c355f236 100644 --- a/cmd/micro/actions.go +++ b/cmd/micro/actions.go @@ -51,10 +51,11 @@ func (v *View) Center(usePlugin bool) bool { } v.Topline = v.Cursor.Y - v.height/2 + if v.Topline+v.height > v.Buf.NumLines { + v.Topline = v.Buf.NumLines - v.height + } if v.Topline < 0 { v.Topline = 0 - } else if v.Topline+v.height > v.Buf.NumLines { - v.Topline = v.Buf.NumLines - v.height } if usePlugin { diff --git a/cmd/micro/highlighter.go b/cmd/micro/highlighter.go index b59b654f..8d8f7941 100644 --- a/cmd/micro/highlighter.go +++ b/cmd/micro/highlighter.go @@ -482,7 +482,6 @@ func Match(v *View) SyntaxMatches { for _, value := range indicies { start := runePos(value[0], line) end := runePos(value[1], line) - // messenger.Message(start, " ", end) for i := start; i < end; i++ { matches[lineN][i] = rule.style }