From b10f6d679158c43c119b644aaf1f5102bed4b9fd Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Thu, 28 May 2020 10:47:15 -0400 Subject: [PATCH] How about if we count the lines rendered correctly --- tea.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tea.go b/tea.go index 6164ed2..b25f904 100644 --- a/tea.go +++ b/tea.go @@ -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