mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
fix(api): extmark highlight groups not always included in details
Problem: Erroneous for loop condition.
Solution: Remove for loop condition.
(cherry picked from commit 5d97d61eab
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
37a44f3247
commit
54f930f4e3
@@ -208,7 +208,7 @@ static Array extmark_to_array(const ExtmarkInfo *extmark, bool id, bool add_dict
|
|||||||
|
|
||||||
// uncrustify:on
|
// uncrustify:on
|
||||||
|
|
||||||
for (int j = 0; hls[j].name && hls[j].val; j++) {
|
for (int j = 0; hls[j].name; j++) {
|
||||||
if (hls[j].val) {
|
if (hls[j].val) {
|
||||||
PUT(dict, hls[j].name, hl_group_name(hls[j].val, hl_name));
|
PUT(dict, hls[j].name, hl_group_name(hls[j].val, hl_name));
|
||||||
}
|
}
|
||||||
|
@@ -1541,6 +1541,12 @@ describe('API/extmarks', function()
|
|||||||
virt_text_pos = "win_col",
|
virt_text_pos = "win_col",
|
||||||
virt_text_win_col = 1,
|
virt_text_win_col = 1,
|
||||||
} }, get_extmark_by_id(ns, marks[2], { details = true }))
|
} }, get_extmark_by_id(ns, marks[2], { details = true }))
|
||||||
|
set_extmark(ns, marks[3], 0, 0, { cursorline_hl_group = "Statement" })
|
||||||
|
eq({0, 0, {
|
||||||
|
ns_id = 1,
|
||||||
|
cursorline_hl_group = "Statement",
|
||||||
|
right_gravity = true,
|
||||||
|
} }, get_extmark_by_id(ns, marks[3], { details = true }))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('can get marks from anonymous namespaces', function()
|
it('can get marks from anonymous namespaces', function()
|
||||||
|
Reference in New Issue
Block a user