Change var name
This commit is contained in:
@@ -45,25 +45,25 @@ custom_entries_view.new = function()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local c = config.get().formatting.fields
|
local fields = config.get().formatting.fields
|
||||||
for i = top, bot do
|
for i = top, bot do
|
||||||
local e = self.entries[i + 1]
|
local e = self.entries[i + 1]
|
||||||
if e then
|
if e then
|
||||||
local v = e:get_view(self.offset)
|
local v = e:get_view(self.offset)
|
||||||
local o = 1
|
local o = 1
|
||||||
local a = 0
|
local a = 0
|
||||||
for _, key in ipairs(c) do
|
for _, field in ipairs(fields) do
|
||||||
if key == types.cmp.ItemField.Abbr then
|
if field == types.cmp.ItemField.Abbr then
|
||||||
a = o
|
a = o
|
||||||
end
|
end
|
||||||
vim.api.nvim_buf_set_extmark(buf, custom_entries_view.ns, i, o, {
|
vim.api.nvim_buf_set_extmark(buf, custom_entries_view.ns, i, o, {
|
||||||
end_line = i,
|
end_line = i,
|
||||||
end_col = o + v[key].bytes,
|
end_col = o + v[field].bytes,
|
||||||
hl_group = v[key].hl_group,
|
hl_group = v[field].hl_group,
|
||||||
hl_mode = 'combine',
|
hl_mode = 'combine',
|
||||||
ephemeral = true,
|
ephemeral = true,
|
||||||
})
|
})
|
||||||
o = o + v[key].bytes + (self.column_width[key] - v[key].width) + 1
|
o = o + v[field].bytes + (self.column_width[field] - v[field].width) + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, m in ipairs(e.matches or {}) do
|
for _, m in ipairs(e.matches or {}) do
|
||||||
|
|||||||
Reference in New Issue
Block a user