aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ui/textinput.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ui/textinput.go b/lib/ui/textinput.go
index f7301fb3..f6b0c725 100644
--- a/lib/ui/textinput.go
+++ b/lib/ui/textinput.go
@@ -181,7 +181,7 @@ func (ti *TextInput) insert(ch rune) {
func (ti *TextInput) deleteWord() {
// TODO: Break on any of / " '
- if len(ti.text) == 0 {
+ if len(ti.text) == 0 || ti.index <= 0 {
return
}
i := ti.index - 1