coder / coder/claudecode.nvim

[BUG] floating window does not disappear when diff view is shown

Offen
#180 0 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Lua
Sterne
3.1k
Forks
216
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

## Bug Description

With `terminal.snacks_win_opts.position` is set to `float`, the floating window does not disappear when a diff view is opened. Instead, the diff view is visible and has cursor focus. Calling `ClaudeCodeFocus` will switch focus to the open floating window. Calling it again will make the window disappear and switch to the diff view. However, this is a very cumbersome workaround.

My config:
```
{
terminal_cmd = "~/.claude/local/claude",
diff_opts = {
keep_terminal_focus = false,
},
terminal = {
snacks_win_opts = {
position="float",
width=0.9,
height=0.9,
backdrop={
bg="blue",
blend=90,
},
keys = {
claude_hide = {
toggle_key,
function(self)
self:hide()
end,
mode="t",
desc="Hide",
}
},
}
}
}

```

## To Reproduce

Steps to reproduce the behavior:

1. Open a file and launch Claude Code by calling `ClaudeCodeFocus`.
2. Ask Claude to produce a change to the code.
3. Observe that the diff view opens, with the cursor on it, but the floating window is still visible mostly obscuring it.

## Expected Behavior

The floating window should disappear when the diff view opens.

## Environment

- Neovim version: 0.9.5 (0.9.5-6ubuntu2)
- Claude Code CLI version: 2.1.19
- OS: Ubuntu 24.04.3 LTS
- Plugin version: main (93f8e48)
- Snacks version: 2.27.0

Image

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

The issue mentions ClaudeCodeFocus and the diff-view flow; reproduce it with terminal.snacks_win_opts.position set to float and diff_opts.keep_terminal_focus=false. Trace the focus and window handling around ClaudeCodeFocus and diff opening, then verify that opening the diff hides the floating window without a second focus call.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
lua, neovim
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.