From 96c7bc67c001fef5eb41817076ceb8d9cc74df0e Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Sat, 28 May 2016 14:53:48 -0400 Subject: [PATCH] Make Quit() close help if its open and not the whole editor Fixes #146 --- cmd/micro/bindings.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/micro/bindings.go b/cmd/micro/bindings.go index ed866420..12dbc8d4 100644 --- a/cmd/micro/bindings.go +++ b/cmd/micro/bindings.go @@ -949,6 +949,9 @@ func (v *View) CommandMode() bool { // is the last view // However, since micro only supports one view for now, it doesn't really matter func (v *View) Quit() bool { + if v.helpOpen { + return v.ToggleHelp() + } // Make sure not to quit if there are unsaved changes if views[mainView].CanClose("Quit anyway? (yes, no, save) ") { screen.Fini()