Fix array out of bounds error
This commit is contained in:
parent
05fa79eb8e
commit
866cd17dd7
1 changed files with 1 additions and 1 deletions
|
@ -181,7 +181,7 @@ func (ti *TextInput) insert(ch rune) {
|
||||||
|
|
||||||
func (ti *TextInput) deleteWord() {
|
func (ti *TextInput) deleteWord() {
|
||||||
// TODO: Break on any of / " '
|
// TODO: Break on any of / " '
|
||||||
if len(ti.text) == 0 {
|
if len(ti.text) == 0 || ti.index <= 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
i := ti.index - 1
|
i := ti.index - 1
|
||||||
|
|
Loading…
Reference in a new issue