fix(picker.preview): pattern to detect binary files was incorrect

This commit is contained in:
Folke Lemaitre 2025-01-15 17:10:58 +01:00
parent 719d86a373
commit bbd1a0885b
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -102,7 +102,7 @@ function M.file(ctx)
line = line:sub(1, ctx.picker.opts.previewers.file.max_line_length) .. "..."
end
-- Check for binary data in the current line
if line:find("[%z\1-\8\13\14\16-\31]") then
if line:find("[%z\1-\8\11\12\14-\31]") then
ctx.preview:notify("binary file", "warn")
return
end