akinsho / akinsho/toggleterm.nvim

Toggleterm adds cursor line number when using count modifier to set the id

Đang mở
#569 0 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ả

I get this weird behavior when trying to manage multiple terminal instances using keymaps.

```lua
vim.keymap.set("n", "", ":ToggleTerm size=20 direction=vertical", {noremap = true})
```

It opens the terminal#1, all fine. It works perfectly with no count modifier.
But when i tap `4` while the cursor is in line 30, it opens the terminal#34 instead of terminal#4.
The only way back is moving the cursor to line 1.

Using the keymap without the return i noticed the value being passed to the command is this:

```lua
.,.+4ToggleTerm size=20 direction=vertical
```

I guess this points to the current line number.

How can i avoid this?
Any help with this will be really appreciated!
Thanks

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.