// Display draws the statusline to the screen
func (sline *Statusline) Display() {
+ if messenger.hasPrompt && !GetGlobalOption("infobar").(bool) {
+ return
+ }
+
// We'll draw the line at the lowest line in the view
y := sline.view.Height + sline.view.y
file := sline.view.Buf.GetName()
// If the buffer is dirty (has been modified) write a little '+'
- if sline.view.Buf.IsModified {
+ if sline.view.Buf.Modified() {
file += " +"
}
// Add the filetype
file += " " + sline.view.Buf.FileType()
+ 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 {
- rightText = helpBinding + " for help "
+ if len(kmenuBinding) > 0 {
+ rightText += ", "
+ }
if sline.view.Type == vtHelp {
- rightText = helpBinding + " to close help "
+ rightText += helpBinding + ": close help"
+ } else {
+ rightText += helpBinding + ": open help"
}
}
+ rightText += " "
statusLineStyle := defStyle.Reverse(true)
if style, ok := colorscheme["statusline"]; ok {