Bug Description
When running :ClaudeCodeSend while Claude Code is not in a visible buffer, an error message is shown in Neovim. After dismissing the error with Enter, the context is still sent to Claude Code as expected.
To Reproduce
- Open Neovim
- Run
:ClaudeCode twice to launch and then hide Claude Code.
- Make a selection with visual mode
- Run
:ClaudeCodeSend
Expected Behavior
The selected code should be sent to Claude Code without throwing an error. Personally, I would want this command to also open the hidden Claude Code buffer.
Environment
- Neovim version: 0.11.1
- Claude Code CLI version: 1.0.24
- OS: macOS 15.5
- Plugin version: commit da78309
Error Messages
Error executing vim.schedule lua callback: .../lazy/claudecode.nvim/lua/claudecode/terminal/native.lua:147: Invalid 'window': Expected Lua number
stack traceback:
[C]: in function 'nvim_set_current_win'
.../lazy/claudecode.nvim/lua/claudecode/terminal/native.lua:147: in function 'focus_terminal'
.../lazy/claudecode.nvim/lua/claudecode/terminal/native.lua:256: in function 'open'
...re/nvim/lazy/claudecode.nvim/lua/claudecode/terminal.lua:199: in function 'open'
.../share/nvim/lazy/claudecode.nvim/lua/claudecode/init.lua:498: in function 'callback'
.../lazy/claudecode.nvim/lua/claudecode/visual_commands.lua:52: in function <.../lazy/claudecode.nvim/lua/claudecode/visual_commands.lua:50>
Bug Description
When running
:ClaudeCodeSendwhile Claude Code is not in a visible buffer, an error message is shown in Neovim. After dismissing the error withEnter, the context is still sent to Claude Code as expected.To Reproduce
:ClaudeCodetwice to launch and then hide Claude Code.:ClaudeCodeSendExpected Behavior
The selected code should be sent to Claude Code without throwing an error. Personally, I would want this command to also open the hidden Claude Code buffer.
Environment
Error Messages