mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-17 20:40:26 +09:00
Fix redraw glitch
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user