]> git.lizzy.rs Git - micro.git/blobdiff - cmd/micro/statusline.go
Merge pull request #1125 from nabeelomer/master
[micro.git] / cmd / micro / statusline.go
index 8e8aa8e23115122fb8d6cc47b5da86dc2525387b..d346a033852e0fd4a370896fa2b6fdf0f61038aa 100644 (file)
@@ -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 {
@@ -75,7 +77,7 @@ func (sline *Statusline) Display() {
        fileRunes := []rune(file)
 
        if sline.view.Type == vtTerm {
-               fileRunes = []rune(sline.view.termtitle)
+               fileRunes = []rune(sline.view.term.title)
                rightText = ""
        }