mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-21 16:30:24 +00:00
Fix redraw glitch
This commit is contained in:
parent
cd6389c49e
commit
5e83b2c99a
1 changed files with 6 additions and 2 deletions
|
|
@ -458,9 +458,13 @@ func (v *View) DisplayView() {
|
|||
for lineN := 0; lineN < v.height; lineN++ {
|
||||
var x int
|
||||
// If the buffer is smaller than the view height
|
||||
// and we went too far, break
|
||||
if lineN+v.Topline >= v.Buf.NumLines {
|
||||
break
|
||||
// We have to clear all this space
|
||||
for i := 0; i < v.width; i++ {
|
||||
screen.SetContent(i, lineN, ' ', nil, defStyle)
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
line := v.Buf.Lines[lineN+v.Topline]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue