feat(api): evaluate 'statuscolumn' with nvim_eval_statusline()

This commit is contained in:
Luuk van Baal
2023-04-01 14:58:52 +02:00
parent 9e7426718b
commit f0ac91c58b
13 changed files with 153 additions and 74 deletions

View File

@@ -959,12 +959,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, bool use_winbar)
const char *get_default_stl_hl(win_T *wp, bool use_winbar, int stc_hl_id)
{
if (wp == NULL) {
return "TabLineFill";
} else if (use_winbar) {
return (wp == curwin) ? "WinBar" : "WinBarNC";
} else if (stc_hl_id > 0) {
return syn_id2name(stc_hl_id);
} else {
return (wp == curwin) ? "StatusLine" : "StatusLineNC";
}