Skip to content

fix(snacks): invalid window on :ClaudeCodeFocus #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2025

Conversation

qw457812
Copy link
Contributor

Steps to reproduce:

  1. :ClaudeCode to open claude code
  2. <c-h> to focus main window
  3. <c-w>o in main window to close claude code
  4. :ClaudeCodeFocus to focus claude code

I got:

Lua :command callback: .../lazy/claudecode.nvim/lua/claudecode/terminal/snacks.lua:213: Invalid window id: 1010
stack traceback:
 [C]: in function 'nvim_set_current_win'
 .../lazy/claudecode.nvim/lua/claudecode/terminal/snacks.lua:213: in function 'focus_toggle'
 ...re/nvim/lazy/claudecode.nvim/lua/claudecode/terminal.lua:257: in function 'focus_toggle'
 .../share/nvim/lazy/claudecode.nvim/lua/claudecode/init.lua:905: in function <.../share/nvim/lazy/claudecode.nvim/lua/claudecode/init.lua:899>

Config:

{
    "coder/claudecode.nvim",
    dependencies = { "folke/snacks.nvim" },
    cmd = "ClaudeCode",
    init = function()
      vim.env.CLAUDE_CONFIG_DIR = vim.fn.expand("~/.config/claude")
    end,
    opts = {},
}

Copy link
Member

@ThomasK33 ThomasK33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks a lot. 👍

@ThomasK33 ThomasK33 added this pull request to the merge queue Jul 28, 2025
Merged via the queue into coder:main with commit 8876747 Jul 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants