Skip to content

Commit 98c0e00

Browse files
committed
feat(buffers): use vim.b.term_title (closes #2456)
1 parent 049c0ee commit 98c0e00

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lua/fzf-lua/providers/buffers.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ local populate_buffer_entries = function(opts, bufnrs, winid)
129129
buf.info.name = utils.nvim_buf_get_name(buf.bufnr, buf.info)
130130
end
131131

132+
-- Use vim.b.term_title where possible (#2456)
133+
if utils.is_term_bufname(buf.info.name) then
134+
local term_title = vim.b[bufnr].term_title
135+
if term_title ~= buf.info.name then
136+
buf.info.name = "term://" .. term_title:gsub("^term://", "")
137+
end
138+
end
139+
132140
-- get the correct lnum for tabbed buffers
133141
if winid then
134142
buf.info.lnum = vim.api.nvim_win_get_cursor(winid)[1]

0 commit comments

Comments
 (0)