File tree 1 file changed +3
-2
lines changed
lua/blink/cmp/windows/lib
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -108,20 +108,21 @@ end
108
108
--- @return number[]
109
109
function renderer .get_max_lengths (components_list , min_width )
110
110
local lengths = {}
111
- local first_fill = 1
111
+ local first_fill
112
112
113
113
for _ , components in ipairs (components_list ) do
114
114
for i , component in ipairs (components ) do
115
115
local length = renderer .get_length (component )
116
116
if not lengths [i ] or lengths [i ] < length then lengths [i ] = length end
117
- if component .fill and first_fill == 1 then first_fill = i end
117
+ if component .fill and not first_fill then first_fill = i end
118
118
end
119
119
end
120
120
121
121
for _ , length in ipairs (lengths ) do
122
122
min_width = min_width - length
123
123
end
124
124
125
+ first_fill = first_fill or 1
125
126
if min_width > 0 then lengths [first_fill ] = lengths [first_fill ] + min_width end
126
127
127
128
return lengths
You can’t perform that action at this time.
0 commit comments