diff --git a/jrnl/cli.py b/jrnl/cli.py index 20e39f9a..50601555 100644 --- a/jrnl/cli.py +++ b/jrnl/cli.py @@ -161,7 +161,11 @@ def run(manual_args=None): elif config['editor']: raw = util.get_text_from_editor(config) else: - raw = util.py23_read("[Compose Entry; " + _exit_multiline_code + " to finish writing]\n") + try: + raw = util.py23_read("[Compose Entry; " + _exit_multiline_code + " to finish writing]\n") + except KeyboardInterrupt: + util.prompt("[Entry NOT saved to journal.]") + sys.exit(0) if raw: args.text = [raw] else: diff --git a/jrnl/util.py b/jrnl/util.py index 66ef46f4..5c0eb476 100644 --- a/jrnl/util.py +++ b/jrnl/util.py @@ -73,11 +73,7 @@ def py23_input(msg=""): return STDIN.readline().strip() def py23_read(msg=""): - STDERR.write(u(msg)) - try: - return STDIN.read() - except KeyboardInterrupt: - sys.exit(0) + return STDIN.read() def yesno(prompt, default=True): prompt = prompt.strip() + (" [Y/n]" if default else " [y/N]")