akinsho / akinsho/toggleterm.nvim

[BUG] TermSelect doesn't show anything

未关闭
#578 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Lua
星标
5.6k
派生
206
PR 合并指标
30 天内没有已合并 PR

描述

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

I'm using mutiple floating terminals and switch between them using `TermSelect`.

Sometimes (didn't find how this arises yet), `TermSelect` doesn't respond (no selector UI is displayed).
My terminals are still here as I still can open them using ` ToggleTerm`.

### Expected Behavior

The terminal selection UI should be displayed.

### Steps To Reproduce

(instructions to reproduce the problem to come when things become clearer to me).

Here's my config (Lazy.nvim block):

```lua
{
"akinsho/toggleterm.nvim",
config = function()
require("toggleterm").setup({
shade_terminals = false,
direction = "float",
float_opts = {
border = "curved",
},
winbar = {
enabled = true,
name_formatter = function(term) -- term: Terminal
return term.name
end,
},
open_mapping = [[]],
on_open = function()
-- Disable troll-stopper highlight
vim.cmd([[highlight TrollStopper ctermbg = none guibg = none]])
end,
on_close = function()
-- Enable troll-stopper highlight
vim.cmd([[highlight TrollStopper ctermbg = red guibg = red]])
end,
})

vim.api.nvim_create_user_command("TermNew", function()
term = require("toggleterm.terminal").Terminal:new({})
term:spawn()
term:toggle()
end, { bang = true })
end,
keys = {
{ "", "TermNew", desc = "NeoTree" },
{ "", "ToggleTermSetName", mode = { "n", "t" }, desc = "NeoTree" },
{ "", "ToggleTermSetName", mode = { "n", "t" }, desc = "NeoTree" },
{ "", "TermNew", mode = { "n", "t" }, desc = "NeoTree" },
{ "", "TermNew", mode = { "n", "t" }, desc = "NeoTree" },
{ "", "TermSelect", mode = { "n", "t" }, desc = "NeoTree" },
{ "", "TermSelect", mode = { "n", "t" }, desc = "NeoTree" },
},
cmd = { "TermNew" },
},

```

### Environment

```Markdown
- OS: Debian 12
- neovim version: v0.9.5
- Shell: zsh
```

### Anything else?

_No response_

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。