diff options
author | T <t@tjp.lol> | 2025-08-13 16:06:36 -0600 |
---|---|---|
committer | T <t@tjp.lol> | 2025-08-13 16:34:23 -0600 |
commit | 5c3554c7e49abe263faf54c61e435ba1d5202d27 (patch) | |
tree | ba4956af69205884cc1ff3fae211dad151adc194 /internal/tui/keys.go | |
parent | e9e6eb4e456ee53da5a6ef743251410d4d3d8381 (diff) |
update TODO, and fix a crash
Diffstat (limited to 'internal/tui/keys.go')
-rw-r--r-- | internal/tui/keys.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/tui/keys.go b/internal/tui/keys.go index 69ce223..05e1a05 100644 --- a/internal/tui/keys.go +++ b/internal/tui/keys.go @@ -259,7 +259,7 @@ var Bindings map[KeyBindingScope]map[string]KeyBinding = map[KeyBindingScope]map "ctrl+n": KeyBinding{ Key: "Ctrl+n", Description: func(m AppModel) string { - if m.modalBox.form.fields[m.modalBox.form.selIdx].suggestions == noSuggestions { + if m.modalBox.form.selIdx >= len(m.modalBox.form.fields) || m.modalBox.form.fields[m.modalBox.form.selIdx].suggestions == noSuggestions { return "" } else { return "Accept Suggestion" |