Skip to content

Commit

Permalink
fix: buffer path (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 authored Sep 11, 2023
1 parent 87ee164 commit b0dc926
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/fzfx/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,9 @@ local Defaults = {
local bufnrs_list = vim.api.nvim_list_bufs()
local bufpaths_list = {}
local current_bufpath = valid_bufnr(context.bufnr)
and path.reduce(context.bufnr)
and path.reduce(
vim.api.nvim_buf_get_name(context.bufnr)
)
or nil
if
type(current_bufpath) == "string"
Expand All @@ -801,7 +803,7 @@ local Defaults = {
table.insert(bufpaths_list, current_bufpath)
end
for _, bn in ipairs(bufnrs_list) do
local bp = path.reduce(bn)
local bp = path.reduce(vim.api.nvim_buf_get_name(bn))
if valid_bufnr(bn) and bp ~= current_bufpath then
table.insert(bufpaths_list, bp)
end
Expand Down

0 comments on commit b0dc926

Please sign in to comment.