fix: type annotations and type errors
This commit is contained in:
parent
0ccf95ae5d
commit
47c7737618
16 changed files with 83 additions and 22 deletions
|
|
@ -476,6 +476,7 @@ M.format_entry_cols = function(entry, column_defs, col_width, adapter)
|
|||
for i, column in ipairs(column_defs) do
|
||||
local chunk = columns.render_col(adapter, column, entry)
|
||||
local text = type(chunk) == "table" and chunk[1] or chunk
|
||||
---@cast text string
|
||||
col_width[i + 1] = math.max(col_width[i + 1], vim.api.nvim_strwidth(text))
|
||||
table.insert(cols, chunk)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue