Properly handle files that don't end with newlines

Closes #603
This commit is contained in:
Zachary Yedidia
2017-03-27 13:15:00 -04:00
parent 790ccd429c
commit 73ab25d008
4 changed files with 23 additions and 5 deletions

View File

@@ -201,7 +201,14 @@ func InitScreen() {
// RedrawAll redraws everything -- all the views and the messenger
func RedrawAll() {
messenger.Clear()
screen.Clear()
w, h := screen.Size()
for x := 0; x < w; x++ {
for y := 0; y < h; y++ {
screen.SetContent(x, y, ' ', nil, defStyle)
}
}
for _, v := range tabs[curTab].views {
v.Display()
}