[BUG] Issues with redraw and terminal hiding after a few interactions with Claude
- Vorherrschende Sprache
- Lua
- Sterne
- 3.1k
- Forks
- 216
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
## Bug Description
I'm using claudecode.nvim with LazyVim with the following configuration:
```
local toggle_key = ""
return {
{
"coder/claudecode.nvim",
dependencies = { "folke/snacks.nvim" },
keys = {
{ toggle_key, "ClaudeCodeFocus", desc = "Claude Code", mode = { "n", "x" } },
},
opts = {
terminal = {
---@module "snacks"
---@type snacks.win.Config|{}
snacks_win_opts = {
position = "float",
width = 0.9,
height = 0.9,
border = "single",
keys = {
claude_hide = {
toggle_key,
function(self)
self:hide()
end,
mode = "t",
desc = "Hide",
},
},
},
},
},
},
}
```
I was not able to find the exactly moment in my workflow the issues happens, but they are:
1. At some point the terminal input just stops to draw and the cursor is placed in some random position in the terminal window. A few things i do try to fix it:
1. Esc+i (i noticed that it enters in normal mode sometimes) or Ctrl+l (or both)
2. ToggleFocus
3. Quit the entire session and start the terminal again
1. When Claude starts to "think" (when understanding your prompt, working through requested changes or finishing your changes to present a summary) if I use my ToggleFocus shortcut `+,` i can't bring the terminal back again. I need to press Esc twice which end up interrupting the session.
## To Reproduce
Steps to reproduce the behavior:
Install neovim, LazyVim, enable claudecode.nvim from extras and use the configuration i mentioned above.
My workflow with Claude is:
1. /model -> opus
2. /plan
3. Interact with Claude prompts or press Esc to add information.
4. Esc
5. /model -> sonnet
6. Shift+Tab to change to `accept edits on`
7. Proceed
Between the steps 1-6, try to toggle focus (always wait for Claude to pause and ask something or finish the current thinking)
During the step 7 try to ToggleFocus the window.
Again, it's a bit random the moment above issues start to happen.
## Expected Behavior
* Consistent (re)draw of window where the input field is always visible and the cursos placed in it
* Being able to ToggleFocus even during Claude thinking.
## Environment
- Neovim version: 0.12.3
- Claude Code CLI version: 2.1.198
- OS: macOS Tahoe 26.5.2
- Plugin version: 0.3.0
## Error Messages
N/A
## Additional Context
N/A
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne damit, das Problem mit der bereitgestellten LazyVim-Konfiguration, den Einstellungen für das schwebende Terminal und dem dokumentierten Claude-Workflow zu reproduzieren, während du während des Denkens den Fokus umschaltest. Verfolge dann die Pfade für die Neuzeichnung des Terminals und die Fokusbehandlung; als erledigt gilt die Aufgabe, wenn Eingabe und Cursor konsistent neu gezeichnet werden und ToggleFocus das Terminal wiederherstellt, ohne Esc zu benötigen oder Claude zu unterbrechen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- lua
- Bereich
- cli, devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 45/100