Merge pull request #744 from alichtman/exit-after-no-text-entry

Exit jrnl if no text entered into editor
This commit is contained in:
Jonathan Wren 2019-11-18 22:06:04 -08:00 committed by GitHub
commit 0bd94c7872
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 53 additions and 3 deletions

View file

@ -176,7 +176,7 @@ def run(manual_args=None):
log.debug('Using journal "%s"', journal_name)
mode_compose, mode_export, mode_import = guess_mode(args, config)
# How to quit writing?
if "win32" in sys.platform:
_exit_multiline_code = "on a blank line, press Ctrl+Z and then Enter"
@ -206,7 +206,7 @@ def run(manual_args=None):
if raw:
args.text = [raw]
else:
mode_compose = False
sys.exit()
# This is where we finally open the journal!
try: