Skip to content

Commit d98bf9d

Browse files
mueslimaaslalani
authored andcommitted
fix(textarea): correctly trim incoming paste
1 parent fc18779 commit d98bf9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

textarea/textarea.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ func (m *Model) insertRunesFromUserInput(runes []rune) {
340340
// If there's not enough space to paste the whole thing cut the pasted
341341
// runes down so they'll fit.
342342
if availSpace < len(runes) {
343-
runes = runes[:len(runes)-availSpace]
343+
runes = runes[:availSpace]
344344
}
345345
}
346346

0 commit comments

Comments
 (0)