Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[BUG] Re-shown snacks split puts the cursor a row above the prompt when it has a winbar

Aperta Adatta ai principianti
#321 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
lua, neovim

Direzione di ricerca

Inizia in lua/claudecode/terminal/snacks.lua e analizza la sequenza di nuova visualizzazione attorno a vsplit, nvim_win_set_buf e reapply_snacks_window_state. Riproduci il ciclo di nascondimento/visualizzazione con il provider snacks predefinito e una winbar. Il lavoro è completato quando lo stato viene riapplicato prima del cambio di buffer e i cambi ripetuti mantengono allineati il prompt e il cursore di Claude senza perdere la winbar.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs-triage

Re-showing the split terminal with the snacks provider still leaves the cursor a row above Claude's ❯ prompt, the symptom in #240, whenever the split has a winbar. That's the default for split terminals (snacks/terminal.lua sets N: %{get(b:, 'term_title', '')} unless wo.winbar is set), and neither claudecode nor LazyVim's claudecode extra overrides it, so it's what you get out of the box.

To reproduce, open Claude in a right split with the default snacks provider, hide it with :ClaudeCode, show it again with :ClaudeCode, and the cursor sits a row above the prompt.

The re-show in lua/claudecode/terminal/snacks.lua runs vsplit, then nvim_win_set_buf, then reapply_snacks_window_state. Until the options are reapplied the terminal sits in a window with no winbar, one row taller than Claude last drew into. Neovim pulls a line of scrollback onto the screen when a terminal grows, and when the winbar comes back it drops a blank row off the bottom instead of pushing that line back, so the content ends up a row lower than Claude thinks it is. Claude redraws relative to the cursor, so every frame after that is a row off.

Moving reapply_snacks_window_state(term, new_win) above nvim_win_set_buf fixes it for me. The winbar survives the buffer switch, and hide/show stayed aligned in every case I tried, four quick toggles in a row included, with no Ctrl+L sent. Setting snacks_win_opts.wo.winbar = "" also works, but loses the title.

  • Neovim 0.12.5
  • Claude Code 2.1.283
  • claudecode.nvim 2390c6e (current main)
  • snacks.nvim 882c996
  • WSL2 Ubuntu
Lingua principale
Lua
Stelle
3.1k
Fork
217
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/claudecode.nvim

Tutte le issue di coder/claudecode.nvim

Issue simili

Altre issue su Lua

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.