diff options
author | Lewis Russell <lewis6991@gmail.com> | 2022-08-11 17:26:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-11 17:26:17 +0100 |
commit | a27756cc2463139343aa3c214ad20908d42f67a6 (patch) | |
tree | 8e5c1e8b53a41b5456bf15bf2f5e494cb16897c4 /src | |
parent | 996fc2256bafabeb8f5806d70d531311a34d29f9 (diff) | |
download | rneovim-a27756cc2463139343aa3c214ad20908d42f67a6.tar.gz rneovim-a27756cc2463139343aa3c214ad20908d42f67a6.tar.bz2 rneovim-a27756cc2463139343aa3c214ad20908d42f67a6.zip |
fix(signs): priority of extmark signs (#19718)
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/api/extmark.c | 5 | ||||
-rw-r--r-- | src/nvim/decoration.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/nvim/api/extmark.c b/src/nvim/api/extmark.c index da1b6beeda..c36f127507 100644 --- a/src/nvim/api/extmark.c +++ b/src/nvim/api/extmark.c @@ -441,8 +441,9 @@ Array nvim_buf_get_extmarks(Buffer buffer, Integer ns_id, Object start, Object e /// the extmark end position (if it exists) will be shifted /// in when new text is inserted (true for right, false /// for left). Defaults to false. -/// - priority: a priority value for the highlight group. For -/// example treesitter highlighting uses a value of 100. +/// - priority: a priority value for the highlight group or sign +/// attribute. For example treesitter highlighting uses a +/// value of 100. /// - strict: boolean that indicates extmark should not be placed /// if the line or column value is past the end of the /// buffer or end of the line respectively. Defaults to true. diff --git a/src/nvim/decoration.c b/src/nvim/decoration.c index 6f946bb41a..8258f2afd5 100644 --- a/src/nvim/decoration.c +++ b/src/nvim/decoration.c @@ -385,7 +385,7 @@ void decor_redraw_signs(buf_T *buf, int row, int *num_signs, sign_attrs_T sattrs int j; for (j = (*num_signs); j > 0; j--) { - if (sattrs[j].sat_prio <= decor->priority) { + if (sattrs[j - 1].sat_prio >= decor->priority) { break; } sattrs[j] = sattrs[j - 1]; |