diff options
author | Lewis Russell <lewis6991@gmail.com> | 2022-01-03 12:22:13 +0000 |
---|---|---|
committer | Lewis Russell <lewis6991@gmail.com> | 2022-03-05 16:51:59 +0000 |
commit | 30e4cc3b3f2133e9a7170da9da8175832681f39a (patch) | |
tree | 76cca17f4b3389246743afc5febaeb11deeb20b1 /src/nvim/screen.c | |
parent | 83fc914337100d03f2e41a3943ccf0107d893698 (diff) | |
download | rneovim-30e4cc3b3f2133e9a7170da9da8175832681f39a.tar.gz rneovim-30e4cc3b3f2133e9a7170da9da8175832681f39a.tar.bz2 rneovim-30e4cc3b3f2133e9a7170da9da8175832681f39a.zip |
feat(decorations): support signs
Add the following options to extmarks:
- sign_text
- sign_hl_group
- number_hl_group
- line_hl_group
- cursorline_hl_group
Note: ranges are unsupported and decorations are only applied to
start_row
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 7fafe3dd6e..ee1acd8d03 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2208,6 +2208,8 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc buf_T *buf = wp->w_buffer; bool end_fill = (lnum == buf->b_ml.ml_line_count+1); + has_decor = decor_redraw_line(buf, lnum-1, &decor_state); + if (!number_only) { // To speed up the loop below, set extra_check when there is linebreak, // trailing white space and/or syntax processing to be done. @@ -2229,9 +2231,6 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc } } - has_decor = decor_redraw_line(wp->w_buffer, lnum-1, - &decor_state); - for (size_t k = 0; k < kv_size(*providers); k++) { DecorProvider *p = kv_A(*providers, k); if (p && p->redraw_line != LUA_NOREF) { @@ -2460,6 +2459,9 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, bool noc memset(sattrs, 0, sizeof(sattrs)); num_signs = buf_get_signattrs(wp->w_buffer, lnum, sattrs); + if (decor_state.has_sign_decor) { + decor_redraw_signs(buf, &decor_state, lnum-1, &num_signs, sattrs); + } // If this line has a sign with line highlighting set line_attr. // TODO(bfredl, vigoux): this should not take priority over decoration! |