]> git.lizzy.rs Git - micro.git/blobdiff - cmd/micro/bindings.go
Merge pull request #1135 from whilei/gofmt-2018-Jun-17-00-39
[micro.git] / cmd / micro / bindings.go
index 721226dd1c5d7f4d9cc1b3ef4795cf30600f4b44..e3a02841718f97ab6cfd497607c1ea85436146c5 100644 (file)
@@ -80,6 +80,8 @@ var bindingActions = map[string]func(*View, bool) bool{
        "End":                    (*View).End,
        "PageUp":                 (*View).PageUp,
        "PageDown":               (*View).PageDown,
+       "SelectPageUp":           (*View).SelectPageUp,
+       "SelectPageDown":         (*View).SelectPageDown,
        "HalfPageUp":             (*View).HalfPageUp,
        "HalfPageDown":           (*View).HalfPageDown,
        "StartOfLine":            (*View).StartOfLine,
@@ -255,6 +257,7 @@ var bindingKeys = map[string]tcell.Key{
        "Escape":         tcell.KeyEscape,
        "Enter":          tcell.KeyEnter,
        "Backspace":      tcell.KeyBackspace2,
+       "OldBackspace":   tcell.KeyBackspace,
 
        // I renamed these keys to PageUp and PageDown but I don't want to break someone's keybindings
        "PgUp":   tcell.KeyPgUp,
@@ -338,6 +341,10 @@ modSearch:
                }
        }
 
+       if len(k) == 0 {
+               return Key{buttons: -1}, false
+       }
+
        // Control is handled specially, since some character codes in bindingKeys
        // are different when Control is depressed. We should check for Control keys
        // first.