diff --git a/internal/action/actions.go b/internal/action/actions.go index 7efb8135..4aeba6f3 100644 --- a/internal/action/actions.go +++ b/internal/action/actions.go @@ -1,7 +1,6 @@ package action import ( - "log" "regexp" "runtime" "strings" @@ -633,11 +632,9 @@ func (h *BufPane) CycleAutocompleteBack() bool { if h.Cursor.HasSelection() { return false } - log.Println(h.Buf.HasSuggestions) if h.Buf.HasSuggestions { h.Buf.CycleAutocomplete(false) - log.Println("TRUE") return true } return false diff --git a/internal/action/infopane.go b/internal/action/infopane.go index acff3597..9c137c52 100644 --- a/internal/action/infopane.go +++ b/internal/action/infopane.go @@ -73,6 +73,7 @@ func (h *InfoPane) HandleEvent(event tcell.Event) { } } +// DoKeyEvent executes a key event for the command bar, doing any overriden actions func (h *InfoPane) DoKeyEvent(e KeyEvent) bool { done := false if action, ok := BufKeyBindings[e]; ok { @@ -85,7 +86,7 @@ func (h *InfoPane) DoKeyEvent(e KeyEvent) bool { for s, a := range InfoOverrides { // TODO this is a hack and really we should have support // for having binding overrides for different buffers - if strings.Contains(estr, s) { + if strings.HasPrefix(estr, s) { done = true a(h) break