mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(extmarks): missing "spell" and "conceal" in details (#27116)
This commit is contained in:
parent
3f188bc533
commit
215244f749
@ -975,21 +975,21 @@ void decor_to_dict_legacy(Dictionary *dict, DecorInline decor, bool hl_name)
|
|||||||
if (sh_hl.hl_id) {
|
if (sh_hl.hl_id) {
|
||||||
PUT(*dict, "hl_group", hl_group_name(sh_hl.hl_id, hl_name));
|
PUT(*dict, "hl_group", hl_group_name(sh_hl.hl_id, hl_name));
|
||||||
PUT(*dict, "hl_eol", BOOLEAN_OBJ(sh_hl.flags & kSHHlEol));
|
PUT(*dict, "hl_eol", BOOLEAN_OBJ(sh_hl.flags & kSHHlEol));
|
||||||
if (sh_hl.flags & kSHConceal) {
|
|
||||||
char buf[MAX_SCHAR_SIZE];
|
|
||||||
schar_get(buf, sh_hl.text[0]);
|
|
||||||
PUT(*dict, "conceal", CSTR_TO_OBJ(buf));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sh_hl.flags & kSHSpellOn) {
|
|
||||||
PUT(*dict, "spell", BOOLEAN_OBJ(true));
|
|
||||||
} else if (sh_hl.flags & kSHSpellOff) {
|
|
||||||
PUT(*dict, "spell", BOOLEAN_OBJ(false));
|
|
||||||
}
|
|
||||||
|
|
||||||
priority = sh_hl.priority;
|
priority = sh_hl.priority;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sh_hl.flags & kSHConceal) {
|
||||||
|
char buf[MAX_SCHAR_SIZE];
|
||||||
|
schar_get(buf, sh_hl.text[0]);
|
||||||
|
PUT(*dict, "conceal", CSTR_TO_OBJ(buf));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sh_hl.flags & kSHSpellOn) {
|
||||||
|
PUT(*dict, "spell", BOOLEAN_OBJ(true));
|
||||||
|
} else if (sh_hl.flags & kSHSpellOff) {
|
||||||
|
PUT(*dict, "spell", BOOLEAN_OBJ(false));
|
||||||
|
}
|
||||||
|
|
||||||
if (sh_hl.flags & kSHUIWatched) {
|
if (sh_hl.flags & kSHUIWatched) {
|
||||||
PUT(*dict, "ui_watched", BOOLEAN_OBJ(true));
|
PUT(*dict, "ui_watched", BOOLEAN_OBJ(true));
|
||||||
}
|
}
|
||||||
|
@ -1639,6 +1639,40 @@ describe('API/extmarks', function()
|
|||||||
right_gravity = true,
|
right_gravity = true,
|
||||||
},
|
},
|
||||||
}, get_extmark_by_id(ns, marks[3], { details = true }))
|
}, get_extmark_by_id(ns, marks[3], { details = true }))
|
||||||
|
set_extmark(ns, marks[4], 0, 0, {
|
||||||
|
end_col = 1,
|
||||||
|
conceal = 'a',
|
||||||
|
spell = true,
|
||||||
|
})
|
||||||
|
eq({
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
{
|
||||||
|
conceal = 'a',
|
||||||
|
end_col = 1,
|
||||||
|
end_right_gravity = false,
|
||||||
|
end_row = 0,
|
||||||
|
ns_id = 1,
|
||||||
|
right_gravity = true,
|
||||||
|
spell = true,
|
||||||
|
},
|
||||||
|
}, get_extmark_by_id(ns, marks[4], { details = true }))
|
||||||
|
set_extmark(ns, marks[5], 0, 0, {
|
||||||
|
end_col = 1,
|
||||||
|
spell = false,
|
||||||
|
})
|
||||||
|
eq({
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
{
|
||||||
|
end_col = 1,
|
||||||
|
end_right_gravity = false,
|
||||||
|
end_row = 0,
|
||||||
|
ns_id = 1,
|
||||||
|
right_gravity = true,
|
||||||
|
spell = false,
|
||||||
|
},
|
||||||
|
}, get_extmark_by_id(ns, marks[5], { details = true }))
|
||||||
api.nvim_buf_clear_namespace(0, ns, 0, -1)
|
api.nvim_buf_clear_namespace(0, ns, 0, -1)
|
||||||
-- legacy sign mark includes sign name
|
-- legacy sign mark includes sign name
|
||||||
command('sign define sign1 text=s1 texthl=Title linehl=LineNR numhl=Normal culhl=CursorLine')
|
command('sign define sign1 text=s1 texthl=Title linehl=LineNR numhl=Normal culhl=CursorLine')
|
||||||
|
Loading…
Reference in New Issue
Block a user