fix(textarea): paste (#250)

This commit is contained in:
hhe07 2022-10-06 13:54:43 -06:00 committed by GitHub
parent d3aed22a41
commit b2b7040ccf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 // Reset blink state if necessary and run overflow checks
m.SetCursor(m.col + len(paste)) m.SetCursor(m.col + len(paste))
} }