Fix empty splits and single terms

This commit is contained in:
Zachary Yedidia
2019-01-13 18:18:23 -05:00
parent 8858c03b3b
commit 5701ed211a
6 changed files with 41 additions and 21 deletions

View File

@@ -70,9 +70,9 @@ var formatParser = regexp.MustCompile(`\$\(.+?\)`)
// Display draws the statusline to the screen
func (s *StatusLine) Display() {
// TODO: don't display if infobar off and has message
// if !GetGlobalOption("infobar").(bool) {
// return
// }
if !config.GetGlobalOption("infobar").(bool) {
return
}
// We'll draw the line at the lowest line in the window
y := s.win.Height + s.win.Y - 1
@@ -84,7 +84,6 @@ func (s *StatusLine) Display() {
return []byte(fmt.Sprint(s.FindOpt(string(option))))
} else if bytes.HasPrefix(name, []byte("bind")) {
binding := string(name[5:])
// TODO: search bindings
for k, v := range config.Bindings {
if v == binding {
return []byte(k)