mirror of
https://github.com/zyedidia/micro
synced 2024-10-14 11:52:32 +00:00
Fix cycleback in infopane
This commit is contained in:
parent
6a1b8f4a4f
commit
28ed47e358
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue