akinsho / akinsho/toggleterm.nvim

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

オープン
#569 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Lua
スター
5.6k
フォーク
206
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。