Exit jrnl if no text entered into editor

Fix #589
This commit is contained in:
Aaron Lichtman 2019-11-14 12:00:23 +01:00
parent ef23d7eabe
commit 2890e33cac
No known key found for this signature in database
GPG key ID: 22368077DE9F9903

View file

@ -200,6 +200,8 @@ def run(manual_args=None):
util.prompt("[Could not read template at '']".format(config['template'])) util.prompt("[Could not read template at '']".format(config['template']))
sys.exit(1) sys.exit(1)
raw = util.get_text_from_editor(config, template) raw = util.get_text_from_editor(config, template)
if not raw:
sys.exit()
else: else:
try: try:
raw = util.py23_read("[Compose Entry; " + _exit_multiline_code + " to finish writing]\n") raw = util.py23_read("[Compose Entry; " + _exit_multiline_code + " to finish writing]\n")