feat(ui): add 'winbar'

Adds support for a bar at the top of each window, enabled through the
`'winbar'` option.

Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
This commit is contained in:
Famiu Haque
2022-05-13 20:47:11 +06:00
parent b9b5577d6d
commit e1bdb2a258
26 changed files with 538 additions and 169 deletions

View File

@@ -1418,14 +1418,14 @@ bool set_mark(buf_T *buf, String name, Integer line, Integer col, Error *err)
}
/// Get default statusline highlight for window
const char *get_default_stl_hl(win_T *wp)
const char *get_default_stl_hl(win_T *wp, bool use_winbar)
{
if (wp == NULL) {
return "TabLineFill";
} else if (wp == curwin) {
return "StatusLine";
} else if (use_winbar) {
return (wp == curwin) ? "WinBar" : "WinBarNC";
} else {
return "StatusLineNC";
return (wp == curwin) ? "StatusLine" : "StatusLineNC";
}
}