mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-25 15:04:39 +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 {
|
} else {
|
||||||
m.value = runes
|
m.value = runes
|
||||||
}
|
}
|
||||||
if m.pos > len(m.value) {
|
if m.pos == 0 || m.pos > len(m.value) {
|
||||||
m.SetCursor(len(m.value))
|
m.SetCursor(len(m.value))
|
||||||
}
|
}
|
||||||
m.handleOverflow()
|
m.handleOverflow()
|
||||||
|
Loading…
Reference in New Issue
Block a user