pazz / alot

Terminal-based Mail User Agent
GNU General Public License v3.0
697 stars 165 forks source link

Do not quit while the editor is open #1579

Open lucc opened 3 years ago

lucc commented 3 years ago

Describe the bug Alot allowes me to :quit even though an external editor is still running.

Software Versions

To Reproduce Steps to reproduce the behaviour:

  1. set editor_in_thread=True (and for me also editor_spawn=True, might depend on your editor) in the config
  2. compose an email
  3. execute :quit while the editor is still running
  4. you now have an open editor with a tmp file that is useless but might contain a long mail you just composed. Alot/notmuch do not know about this draft/work any longer and will not pick it up automatically then you restart alot

Propsed solution Ideally alot would not quit. In my opinion this does not even have to have its own option but can be implemented unconditionally. I never would want to lose this tmp buffer and would be happy with the "overhead" of being forced to close the editor first and close the envelope buffer.

This would align with the UX of having the options set to false where the editor hides the UI of alot so I can not quit accidentally.