mirror of
https://codeberg.org/FelipeLema/cmp-async-path
synced 2025-05-10 11:48:40 +00:00
fix: fix an issue caused by #44
This commit is contained in:
parent
222ac1ce7e
commit
f3677a7530
@ -113,7 +113,7 @@ local function lines_from(file, count)
|
||||
if first_k:find('\0') then
|
||||
return {'binary file'}
|
||||
end
|
||||
local lines = {'```' .. vim.filetype.match { filename = file }}
|
||||
local lines = { '```' .. (vim.filetype.match { filename = file } or '') }
|
||||
for line in first_k:gmatch("[^\r\n]+") do
|
||||
lines[#lines + 1] = line
|
||||
if count ~= nil and #lines >= count then
|
||||
|
Loading…
Reference in New Issue
Block a user