mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-31 21:30:36 +00:00
parent
6ce8fe3ce1
commit
f8071af717
2 changed files with 3 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue