mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(bigfile): bigfile doesn't work on windows. (#1969)
## Description `bigfile` checks whether the path and the buffer name are identical in filetype detection, but on windows, the path separator might be different. The buffer name should be normalized here. ## Related Issue Fixes #1722
This commit is contained in:
parent
ba7bbcd0df
commit
b4944ff320
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ function M.setup()
|
|||
if not path or not buf or vim.bo[buf].filetype == "bigfile" then
|
||||
return
|
||||
end
|
||||
if path ~= vim.api.nvim_buf_get_name(buf) then
|
||||
if path ~= vim.fs.normalize(vim.api.nvim_buf_get_name(buf)) then
|
||||
return
|
||||
end
|
||||
local size = vim.fn.getfsize(path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue