package action
import (
- "log"
"regexp"
"runtime"
"strings"
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
}
}
+// 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 {
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