X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=cmd%2Fmicro%2Fstatusline.go;h=d346a033852e0fd4a370896fa2b6fdf0f61038aa;hb=41a24e61d6b9017dbe010ae36295cb3c1dd701fc;hp=1114fd21f9966332467ceaa59c393b258bf4b91f;hpb=d668050ebe6d014da94c1c8a216733eb185a6351;p=micro.git diff --git a/cmd/micro/statusline.go b/cmd/micro/statusline.go index 1114fd21..d346a033 100644 --- a/cmd/micro/statusline.go +++ b/cmd/micro/statusline.go @@ -47,24 +47,26 @@ func (sline *Statusline) Display() { file += " " + sline.view.Buf.Settings["fileformat"].(string) rightText := "" - if len(kmenuBinding) > 0 { - if globalSettings["keymenu"].(bool) { - rightText += kmenuBinding + ": hide bindings" - } else { - rightText += kmenuBinding + ": show bindings" - } - } - if len(helpBinding) > 0 { + if !sline.view.Buf.Settings["hidehelp"].(bool) { if len(kmenuBinding) > 0 { - rightText += ", " + if globalSettings["keymenu"].(bool) { + rightText += kmenuBinding + ": hide bindings" + } else { + rightText += kmenuBinding + ": show bindings" + } } - if sline.view.Type == vtHelp { - rightText += helpBinding + ": close help" - } else { - rightText += helpBinding + ": open help" + if len(helpBinding) > 0 { + if len(kmenuBinding) > 0 { + rightText += ", " + } + if sline.view.Type == vtHelp { + rightText += helpBinding + ": close help" + } else { + rightText += helpBinding + ": open help" + } } + rightText += " " } - rightText += " " statusLineStyle := defStyle.Reverse(true) if style, ok := colorscheme["statusline"]; ok {