diff options
author | Famiu Haque <famiuhaque@protonmail.com> | 2022-05-13 20:47:11 +0600 |
---|---|---|
committer | Famiu Haque <famiuhaque@protonmail.com> | 2022-05-18 09:27:08 +0600 |
commit | e1bdb2a258cbe6c5cb981acc6bac82cd9e7706fb (patch) | |
tree | d892e10e8e922e71ce822e7c6a5c41fad1dd73d1 /src/nvim/api/private/helpers.c | |
parent | b9b5577d6d8e07d1e39020c8fc05f817f2e81c66 (diff) | |
download | rneovim-e1bdb2a258cbe6c5cb981acc6bac82cd9e7706fb.tar.gz rneovim-e1bdb2a258cbe6c5cb981acc6bac82cd9e7706fb.tar.bz2 rneovim-e1bdb2a258cbe6c5cb981acc6bac82cd9e7706fb.zip |
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>
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index dcede27bcb..7bd68f277b 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -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"; } } |