From 2890e33cac1acf9d86013b6d0627424d0ea88926 Mon Sep 17 00:00:00 2001 From: Aaron Lichtman Date: Thu, 14 Nov 2019 12:00:23 +0100 Subject: [PATCH] Exit jrnl if no text entered into editor Fix #589 --- jrnl/cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jrnl/cli.py b/jrnl/cli.py index 65a53516..192e3233 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -200,6 +200,8 @@ def run(manual_args=None): util.prompt("[Could not read template at '']".format(config['template'])) sys.exit(1) raw = util.get_text_from_editor(config, template) + if not raw: + sys.exit() else: try: raw = util.py23_read("[Compose Entry; " + _exit_multiline_code + " to finish writing]\n")