mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
<Fix>Error occurs when bigfile_size == nil
This commit is contained in:
parent
11268d8ff1
commit
d902707507
1 changed files with 2 additions and 1 deletions
|
|
@ -119,10 +119,11 @@ vim.filetype.add({
|
|||
pattern = {
|
||||
[".*"] = {
|
||||
function(path, buf)
|
||||
local bfs = vim.g.bigfile_size
|
||||
return vim.bo[buf]
|
||||
and vim.bo[buf].filetype ~= "bigfile"
|
||||
and path
|
||||
and vim.fn.getfsize(path) > vim.g.bigfile_size
|
||||
and (bfs and vim.fn.getfsize(path) > bfs or true)
|
||||
and "bigfile"
|
||||
or nil
|
||||
end,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue