How about if we count the lines rendered correctly

This commit is contained in:
Christian Rocha
2020-05-28 10:47:15 -04:00
parent e7130c9633
commit b10f6d6791

2
tea.go
View File

@@ -167,7 +167,7 @@ func (p *Program) render(model Model) {
}
p.currentRender = view
linesRendered := strings.Count(p.currentRender, "\r\n")
linesRendered := strings.Count(p.currentRender, "\n")
// Add carriage returns to ensure that the cursor travels to the start of a
// column after a newline. Keep in mind that this means that in the rest