fix: stop leaking placeholder buffers and closing user windows on close - #30
Open
KEY60228 wants to merge 1 commit into
Open
fix: stop leaking placeholder buffers and closing user windows on close#30KEY60228 wants to merge 1 commit into
KEY60228 wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two issues in
ui.close():[No Name]listed buffer per review session (pause/submit/abort).[No Name]split could get closed along with ours.The placeholder is now an unlisted scratch buffer with
bufhidden=wipeso 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