diff --git a/textarea/textarea.go b/textarea/textarea.go index f0c0ca54..92d75094 100644 --- a/textarea/textarea.go +++ b/textarea/textarea.go @@ -954,6 +954,11 @@ func (m *Model) characterLeft(insideLine bool) { // cursor blink should be reset. If input is masked, move input to the start // so as not to reveal word breaks in the masked input. func (m *Model) wordLeft() { + // If we're already at the start, do nothing and return + if m.row == 0 && m.col == 0 { + return + } + for { m.characterLeft(true /* insideLine */) if m.col < len(m.value[m.row]) && !unicode.IsSpace(m.value[m.row][m.col]) {