fix: do not load frecency in Neovim starting (#237)

This commit is contained in:
JINNOUCHI Yasushi 2024-08-11 12:21:17 +09:00 committed by GitHub
parent 25d01edae8
commit 7303f126c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,7 +63,10 @@ local function setup(ext_config)
group = group, group = group,
---@param args { buf: integer } ---@param args { buf: integer }
callback = function(args) callback = function(args)
local is_floatwin = vim.api.nvim_win_get_config(0).relative ~= "" if vim.api.nvim_buf_get_name(args.buf) == "" then
return
end
local is_floatwin = vim.api.nvim_win_get_config(args.buf).relative ~= ""
if not is_floatwin then if not is_floatwin then
frecency.register(args.buf) frecency.register(args.buf)
end end