diff options
author | Mateusz Czapliński <czapkofan@gmail.com> | 2018-03-04 22:32:24 +0100 |
---|---|---|
committer | Mateusz Czapliński <czapkofan@gmail.com> | 2018-03-04 22:32:24 +0100 |
commit | 37ae8a31e37275a04b0f464d72a53b6a5e29dd98 (patch) | |
tree | 51618e827c699781bb3a7889ab9b27b278aa6792 | |
parent | 758ce83e968460e89dc5179b27edc3c913ef10a3 (diff) |
fix newline handling
-rw-r--r-- | up.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -130,13 +130,13 @@ func (b *Buf) Draw(y0 int) { x, y := 0, y0 for len(buf) > 0 && y < h { ch, sz := utf8.DecodeRune(buf) + buf = buf[sz:] if ch == '\n' { // TODO: clear to the end of screen line x, y = 0, y+1 continue } termbox.SetCell(x, y, ch, termbox.ColorDefault, termbox.ColorDefault) - buf = buf[sz:] x++ if x > w { x, y = 0, y+1 |