mirror of
https://github.com/charmbracelet/bubbles.git
synced 2026-07-20 18:49:28 -06:00
Merge a9db94eece70c6449dce0f5d83d012eb7f9680fa into 2a7b6fe8a974be085677926be0a3db0ae96b049f
This commit is contained in:
commit
77ac304517
@ -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]) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user