Merge a9db94eece70c6449dce0f5d83d012eb7f9680fa into 2a7b6fe8a974be085677926be0a3db0ae96b049f

This commit is contained in:
hamid-husain 2026-07-06 12:11:56 -04:00 committed by GitHub
commit 77ac304517
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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]) {