akinsho / akinsho/toggleterm.nvim

[BUG] TermSelect doesn't show anything

Đang mở
#578 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Lua
Star
5.6k
Fork
206
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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_

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.