From 47eee84147374844d69e8bfb8f25882ba58abcce Mon Sep 17 00:00:00 2001 From: Maas Lalani Date: Fri, 5 Aug 2022 13:54:18 -0400 Subject: [PATCH] fix: include new line characters for Length() --- textarea/textarea.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/textarea/textarea.go b/textarea/textarea.go index 5a080c8..6cdbffe 100644 --- a/textarea/textarea.go +++ b/textarea/textarea.go @@ -286,7 +286,7 @@ func (m *Model) Length() int { for _, row := range m.value { l += rw.StringWidth(string(row)) } - return l + return l + len(m.value) - 1 } // Line returns the line position.