Skip to content

Commit 8613c45

Browse files
committed
feat(buffers): use term_title as terminal name in buffers list
1 parent b69255d commit 8613c45

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/neo-tree/sources/buffers/lib/items.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ M.get_open_buffers = function(state)
2828
if vim.startswith(path, "term://") then
2929
local name = path:match("term://(.*)//.*")
3030
local abs_path = vim.fn.fnamemodify(name, ":p")
31+
local has_title, title = pcall(vim.api.nvim_buf_get_var, b, "term_title")
3132
local item = {
32-
name = name,
33+
name = has_title and title or name,
3334
ext = "terminal",
3435
path = abs_path,
3536
id = path,

0 commit comments

Comments
 (0)