ShowKeyCmd displays the action that a key is bound to
(args []string)
| 832 | |
| 833 | // ShowKeyCmd displays the action that a key is bound to |
| 834 | func (h *BufPane) ShowKeyCmd(args []string) { |
| 835 | if len(args) < 1 { |
| 836 | InfoBar.Error("Please provide a key to show") |
| 837 | return |
| 838 | } |
| 839 | |
| 840 | event, err := findEvent(parseKeyArg(args[0])) |
| 841 | if err != nil { |
| 842 | InfoBar.Error(err) |
| 843 | return |
| 844 | } |
| 845 | if action, ok := config.Bindings["buffer"][event.Name()]; ok { |
| 846 | InfoBar.Message(action) |
| 847 | } else { |
| 848 | InfoBar.Message(args[0], " has no binding") |
| 849 | } |
| 850 | } |
| 851 | |
| 852 | // BindCmd creates a new keybinding |
| 853 | func (h *BufPane) BindCmd(args []string) { |
nothing calls this directly
no test coverage detected