Skip to content

Commit

Permalink
fix(large_buf): no need to pass in bufnr data
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Feb 13, 2025
1 parent 5c81f6d commit ca7c59c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/astrocore/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,9 @@ function M.setup(opts)
vim.b[args.buf].pre_buf_read = args.event == "BufReadPre"
if require("astrocore.buffer").is_large(args.buf) then
vim.b[args.buf].large_buf = true
local event = { pattern = "LargeBuf", data = { bufnr = args.buf } }
local event = "LargeBuf"
if vim.b[args.buf].pre_buf_read then
event.pattern = event.pattern .. "Pre"
event = event .. "Pre"
else
if vim.tbl_get(M.config, "features", "large_buf", "notify") then
M.notify(
Expand Down

0 comments on commit ca7c59c

Please sign in to comment.