From b2b7040ccf8969694459cde871985ee61dd628be Mon Sep 17 00:00:00 2001 From: hhe07 <57854733+hhe07@users.noreply.github.com> Date: Thu, 6 Oct 2022 13:54:43 -0600 Subject: [PATCH] fix(textarea): paste (#250) --- textarea/textarea.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/textarea/textarea.go b/textarea/textarea.go index a7de53f..d552719 100644 --- a/textarea/textarea.go +++ b/textarea/textarea.go @@ -494,6 +494,10 @@ func (m *Model) handlePaste(v string) { } } + // Put it all back together + value := append(head, tail...) + m.SetValue(string(value)) + // Reset blink state if necessary and run overflow checks m.SetCursor(m.col + len(paste)) }