aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/extmark.c
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2024-05-01 08:08:22 -0500
committerGitHub <noreply@github.com>2024-05-01 08:08:22 -0500
commit0b8a72b73934d33a05e20c255298e88cd921df32 (patch)
treece5908b4112121be8c95b7ede87acf9238cc8e72 /src/nvim/api/extmark.c
parentb5583acc482b125399e9fa6c2454a6db6b1ae3e4 (diff)
downloadrneovim-0b8a72b73934d33a05e20c255298e88cd921df32.tar.gz
rneovim-0b8a72b73934d33a05e20c255298e88cd921df32.tar.bz2
rneovim-0b8a72b73934d33a05e20c255298e88cd921df32.zip
revert: "feat(extmarks): subpriorities (relative to declaration order) (#27131)" (#28585)
This reverts commit 15e77a56b711102fdc123e15b3f37d49bc0b1df1. Subpriorities were added in https://github.com/neovim/neovim/pull/27131 as a mechanism for enforcing query order when using iter_matches in the Tree-sitter highlighter. However, iter_matches proved to have too many complications to use in the highlighter so we eventually reverted back to using iter_captures (https://github.com/neovim/neovim/pull/27901). Thus, subpriorities are no longer needed and can be removed.
Diffstat (limited to 'src/nvim/api/extmark.c')
-rw-r--r--src/nvim/api/extmark.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/nvim/api/extmark.c b/src/nvim/api/extmark.c
index b5f56d270c..60e12e9da8 100644
--- a/src/nvim/api/extmark.c
+++ b/src/nvim/api/extmark.c
@@ -761,32 +761,20 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, Integer line, Integer
col2 = c;
}
- DecorPriority subpriority = DECOR_PRIORITY_BASE;
- if (HAS_KEY(opts, set_extmark, _subpriority)) {
- VALIDATE_RANGE((opts->_subpriority >= 0 && opts->_subpriority <= UINT16_MAX),
- "_subpriority", {
- goto error;
- });
- subpriority = (DecorPriority)opts->_subpriority;
- }
-
if (kv_size(virt_text.data.virt_text)) {
- decor_range_add_virt(&decor_state, r, c, line2, col2, decor_put_vt(virt_text, NULL), true,
- subpriority);
+ decor_range_add_virt(&decor_state, r, c, line2, col2, decor_put_vt(virt_text, NULL), true);
}
if (kv_size(virt_lines.data.virt_lines)) {
- decor_range_add_virt(&decor_state, r, c, line2, col2, decor_put_vt(virt_lines, NULL), true,
- subpriority);
+ decor_range_add_virt(&decor_state, r, c, line2, col2, decor_put_vt(virt_lines, NULL), true);
}
if (url != NULL) {
DecorSignHighlight sh = DECOR_SIGN_HIGHLIGHT_INIT;
sh.url = url;
- decor_range_add_sh(&decor_state, r, c, line2, col2, &sh, true, 0, 0, subpriority);
+ decor_range_add_sh(&decor_state, r, c, line2, col2, &sh, true, 0, 0);
}
if (has_hl) {
DecorSignHighlight sh = decor_sh_from_inline(hl);
- decor_range_add_sh(&decor_state, r, c, line2, col2, &sh, true, (uint32_t)ns_id, id,
- subpriority);
+ decor_range_add_sh(&decor_state, r, c, line2, col2, &sh, true, (uint32_t)ns_id, id);
}
} else {
if (opts->ephemeral) {