Skip to content

fix: stop leaking placeholder buffers and closing user windows on close - #30

Open
KEY60228 wants to merge 1 commit into
mainfrom
fix/ui-close-cleanup
Open

fix: stop leaking placeholder buffers and closing user windows on close#30
KEY60228 wants to merge 1 commit into
mainfrom
fix/ui-close-cleanup

Conversation

@KEY60228

Copy link
Copy Markdown
Owner

Summary

Two issues in ui.close():

  • The surviving window's placeholder was a listed normal buffer, leaking one [No Name] listed buffer per review session (pause/submit/abort).
  • The leftover-window cleanup matched any unnamed empty buffer, so a user's own empty [No Name] split could get closed along with ours.

The placeholder is now an unlisted scratch buffer with bufhidden=wipe so it cleans itself up, and the cleanup loop is restricted to unlisted buffers so listed user buffers are never touched.

Test plan

Headless-nvim test: open a file plus a user-created empty [No Name] split, then run 3 × (:ReviewThemStart:ReviewThemPause). Listed unnamed buffer count stays constant (was +1 per cycle before), and the user's empty window survives every cycle.

🤖 Generated with Claude Code

ui.close() created a listed normal buffer as the surviving window's
placeholder, leaking one [No Name] listed buffer per review session.
The leftover-window cleanup also matched ANY unnamed empty buffer, so
the user's own [No Name] split could get closed along with ours.

Make the placeholder an unlisted scratch buffer with bufhidden=wipe so
it cleans itself up, and restrict the cleanup loop to unlisted buffers
so listed user buffers are never touched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant