Skip to content

[BUG] Input cursor in floating mode moves upwards every time I toogle #183

@RasmusN

Description

@RasmusN

Bug Description

Image

When toggling with a floating window, the cursor moves upwards and gets out of sync.

To Reproduce

Steps to reproduce the behavior:

  1. Press the toggle key a couple of times using position = "float"
  2. See how the cursor moves upwards. Try to input text and see that it is not rendered in the correct position.

Expected Behavior

Renders in the correct position, as when not using floating window.

Environment

  • Neovim version: v0.11.4
  • Claude Code CLI version: 2.1.25
  • OS: macOS 15.6.1
  • Plugin version: 93f8e48b1f6cbf2469b378c20b3df4115252d379

Error Messages

I see no errors

Additional Context

Config:

local toggle_key = "<C-,>"
return {
    "coder/claudecode.nvim",
    dependencies = { "folke/snacks.nvim" },
    opts = {
       terminal_cmd = "~/.local/bin/claude", -- Point to local installation

        terminal = {
        ---@module "snacks"
        ---@type snacks.win.Config|{}
        snacks_win_opts = {
          position = "float",
          width = 0.9,
          height = 0.9,
          keys = {
            claude_hide = {
              toggle_key,
              function(self)
                self:hide()
              end,
              mode = "t",
              desc = "Hide",
            },
          },
        },
      },
    },
    config = true,
    keys = {
        ...
        { toggle_key, "<cmd>ClaudeCodeFocus<cr>", desc = "Claude Code", mode = { "n", "x" } },
    },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions