Skip to content

Commit

Permalink
fix(textarea): paste (charmbracelet#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
hhe07 committed Oct 6, 2022
1 parent d3aed22 commit b2b7040
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions textarea/textarea.go
Expand Up @@ -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))
}
Expand Down

0 comments on commit b2b7040

Please sign in to comment.