From 17397d503e00fa88b35c0d9f9a62fa9ae724f370 Mon Sep 17 00:00:00 2001 From: aerth Date: Wed, 18 May 2016 07:18:14 -0700 Subject: [PATCH] add binding for ClearStatus --- cmd/micro/bindings.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/micro/bindings.go b/cmd/micro/bindings.go index e1077d57..65eb0d53 100644 --- a/cmd/micro/bindings.go +++ b/cmd/micro/bindings.go @@ -65,6 +65,7 @@ func InitBindings() { "EndOfLine": (*View).EndOfLine, "ToggleRuler": (*View).ToggleRuler, "JumpLine": (*View).JumpLine, + "ClearStatus": (*View).ClearStatus, } keys := map[string]tcell.Key{ @@ -289,6 +290,7 @@ func DefaultBindings() map[string]string { "CtrlR": "ToggleRuler", "CtrlL": "JumpLine", "Delete": "Delete", + "Esc": "ClearStatus", } } @@ -842,6 +844,12 @@ func (v *View) JumpLine() bool { return false } +// ClearStatus clears the messenger bar +func (v *View) ClearStatus() bool { + messenger.Message("") + return false +} + // None is no action func None() bool { return false