feat(api): evaluate statusline string #16020

Adds API function `nvim_eval_statusline` to allow evaluating a
statusline string and obtaining information regarding it.

Closes https://github.com/neovim/neovim/issues/15849
This commit is contained in:
Famiu Haque
2021-10-19 01:44:17 +06:00
committed by GitHub
parent e7ea54a3df
commit 9086938f7b
5 changed files with 258 additions and 1 deletions

View File

@@ -1681,3 +1681,15 @@ bool set_mark(buf_T *buf, String name, Integer line, Integer col, Error *err)
}
return res;
}
/// Get default statusline highlight for window
const char *get_default_stl_hl(win_T *wp)
{
if (wp == NULL) {
return "TabLineFill";
} else if (wp == curwin) {
return "StatusLine";
} else {
return "StatusLineNC";
}
}