File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
lua/blink/cmp/completion/windows/render Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,12 @@ function column:get_line_highlights(line_idx)
103
103
table.insert (highlights , { offset , offset + # text , group = column_highlights })
104
104
elseif type (column_highlights ) == ' table' then
105
105
for _ , highlight in ipairs (column_highlights ) do
106
+ local start_col = offset + (highlight [1 ] or 0 )
107
+ local end_col = offset + (highlight [2 ] or # text )
108
+
106
109
table.insert (highlights , {
107
- offset + ( highlight [ 1 ] or 0 ),
108
- offset + ( highlight [ 2 ] or # text ),
110
+ math.min ( math.max ( start_col , offset ), offset + # text ),
111
+ math.min ( math.max ( end_col , offset ), offset + # text ),
109
112
group = highlight .group ,
110
113
params = highlight .params ,
111
114
priority = highlight .priority ,
You can’t perform that action at this time.
0 commit comments