ironmansoftware / psedit

A terminal-based editor for PowerShell
MIT License
256 stars 18 forks source link

Consider prompting for saving before quitting when the buffer has been modified. #52

Closed mklement0 closed 6 months ago

mklement0 commented 6 months ago

Currently, Ctrl+Q quits unconditionally, quietly discarding any unsaved changes, which is unexpected.

Please consider presenting a modal dialog that prompts for saving first (yes/no/cancel), if needed, and possibly also offering a dedicated save-then-quit command.

halvarsson commented 6 months ago

Hi

We added a prompt on quitting a while back but this is not in the PSGallery version yet, I did however spot that the CTRL+Q functionality isn't working properly in Windows Terminal when defined in the MenuBar. I added it as a keyboard shortcut in the StatusBar as well, and now it works consistently (this weird behavior is reproducable in Terminal.Gui too)

ctrl-q-func

There is alot of improvements to psedit thats already in the repo, if you wish to clone and check it out :)

mklement0 commented 6 months ago

Thank you, @halvarsson, both for the info and your PRs.