Skip to content

Conversation

reneleonhardt
Copy link

Changes

  • Separate :x implementation: Write only if named and modified (but not externally), then quit.
  • Does not accept a path anymore (when it was an alias of :write-quit)
  • Does not use force (even if given by :x!)
  • Had to add Document::externally_overwritten()

Closes #4087

@reneleonhardt reneleonhardt force-pushed the feat/exit-more-like-vim branch 2 times, most recently from 78b9552 to bad6646 Compare July 6, 2025 17:33
@reneleonhardt reneleonhardt force-pushed the feat/exit-more-like-vim branch from bad6646 to 2fe15d8 Compare July 6, 2025 17:35
@reneleonhardt reneleonhardt force-pushed the feat/exit-more-like-vim branch 2 times, most recently from 4cbec0b to 93f78ce Compare July 7, 2025 07:24
@reneleonhardt reneleonhardt force-pushed the feat/exit-more-like-vim branch from 76521df to 4647374 Compare July 7, 2025 08:41
@the-mikedavis
Copy link
Member

I merged in #11849 which only checks for modification. I'm not sure checking that the document is named is correct here. Inserting into an unnamed buffer and then trying to exit with :x or :x! in Vim fails.

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.

Allow :x on empty Helix

2 participants