Skip to content

Commit 5262586

Browse files
committed
fix: remove offset from label detail highlight
1 parent 683c47a commit 5262586

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

README.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,7 @@ MiniDeps.add({
439439
{ 0, #ctx.label, group = ctx.deprecated and 'BlinkCmpLabelDeprecated' or 'BlinkCmpLabel' },
440440
}
441441
if ctx.label_detail then
442-
table.insert(
443-
highlights,
444-
{ #ctx.label + 1, #ctx.label + #ctx.label_detail, group = 'BlinkCmpLabelDetail' }
445-
)
442+
table.insert(highlights, { #ctx.label, #ctx.label + #ctx.label_detail, group = 'BlinkCmpLabelDetail' })
446443
end
447444

448445
-- characters matched on the label by the fuzzy matcher

lua/blink/cmp/config.lua

+1-4
Original file line numberDiff line numberDiff line change
@@ -424,10 +424,7 @@ local config = {
424424
{ 0, #ctx.label, group = ctx.deprecated and 'BlinkCmpLabelDeprecated' or 'BlinkCmpLabel' },
425425
}
426426
if ctx.label_detail then
427-
table.insert(
428-
highlights,
429-
{ #ctx.label + 1, #ctx.label + #ctx.label_detail, group = 'BlinkCmpLabelDetail' }
430-
)
427+
table.insert(highlights, { #ctx.label, #ctx.label + #ctx.label_detail, group = 'BlinkCmpLabelDetail' })
431428
end
432429

433430
-- characters matched on the label by the fuzzy matcher

0 commit comments

Comments
 (0)