Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vim: Fix :wq in multibuffer #24603

Merged
merged 12 commits into from
Feb 13, 2025
Merged

vim: Fix :wq in multibuffer #24603

merged 12 commits into from
Feb 13, 2025

Conversation

ConradIrwin
Copy link
Member

@ConradIrwin ConradIrwin commented Feb 11, 2025

Supercedes #24561
Closes #21059

Before this change we would skip saving multibuffers regardless of the save intent. Now we correctly save them.

Along the way:

  • Prompt to save when closing the last singleton copy of an item (even if it's still open in a multibuffer).
  • Update our file name prompt to pull out dirty project items from multibuffers instead of counting multibuffers as untitled files.
  • Fix our prompt test helpers to require passing the button name instead of the index. A few tests were passing invalid responses to save prompts.
  • Refactor the code a bit to hopefully clarify it for the next bug.

Release Notes:

  • Fixed edge-cases when closing multiple items including multibuffers. Previously no prompt was generated when closing an item that was open in a multibuffer, now you will be prompted.
  • vim: Fix :wq in a multibuffer

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 11, 2025
@ConradIrwin ConradIrwin enabled auto-merge (squash) February 13, 2025 17:11
@ConradIrwin ConradIrwin merged commit 2f741c8 into main Feb 13, 2025
12 checks passed
@ConradIrwin ConradIrwin deleted the fix-wq-multibuffer branch February 13, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vim mode :wq doesn't save a buffer if it's open in another pane
1 participant