diff options
author | Famiu Haque <famiuhaque@protonmail.com> | 2021-10-19 01:44:17 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-18 12:44:17 -0700 |
commit | 9086938f7bd6d6ccb7f4a30fb78aeaf0d84e4471 (patch) | |
tree | 9e286903da8123085956beaf7eb9dd33e5741aad /src/nvim/api/private/helpers.c | |
parent | e7ea54a3dfaf937021e68bc690c4d27eed9c1cca (diff) | |
download | rneovim-9086938f7bd6d6ccb7f4a30fb78aeaf0d84e4471.tar.gz rneovim-9086938f7bd6d6ccb7f4a30fb78aeaf0d84e4471.tar.bz2 rneovim-9086938f7bd6d6ccb7f4a30fb78aeaf0d84e4471.zip |
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
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index b2529db5be..f1259c8a18 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -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"; + } +} |