fix: include new line characters for Length()

This commit is contained in:
Maas Lalani 2022-08-05 13:54:18 -04:00
parent 84eacf535a
commit 47eee84147

View File

@ -286,7 +286,7 @@ func (m *Model) Length() int {
for _, row := range m.value { for _, row := range m.value {
l += rw.StringWidth(string(row)) l += rw.StringWidth(string(row))
} }
return l return l + len(m.value) - 1
} }
// Line returns the line position. // Line returns the line position.