mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-24 14:44:38 +03:00
Reset cursor in SetValue when initial pos is 0
This commit is contained in:
parent
c8f4855d20
commit
f719cc8cb1
@ -139,7 +139,7 @@ func (m *Model) SetValue(s string) {
|
||||
} else {
|
||||
m.value = runes
|
||||
}
|
||||
if m.pos > len(m.value) {
|
||||
if m.pos == 0 || m.pos > len(m.value) {
|
||||
m.SetCursor(len(m.value))
|
||||
}
|
||||
m.handleOverflow()
|
||||
|
Loading…
Reference in New Issue
Block a user