Skip to content

Commit

Permalink
feat: add width param to title_fnamemodify (ibhagwan#1132)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Apr 13, 2024
1 parent 8161cb9 commit 344b309
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/fzf-lua/previewer/builtin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,8 @@ function Previewer.buffer_or_file:update_border(entry)
local title = filepath or entry.uri
-- was transform function defined?
if self.title_fnamemodify then
title = self.title_fnamemodify(title)
local wincfg = vim.api.nvim_win_get_config(self.win.border_winid)
title = self.title_fnamemodify(title, wincfg and wincfg.width)
end
if entry.bufnr then
title = string.format("buf %d: %s", entry.bufnr, title)
Expand Down

0 comments on commit 344b309

Please sign in to comment.