diff --git a/jrnl/editor.py b/jrnl/editor.py index b6799b41..89fcb35d 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -44,9 +44,6 @@ def get_text_from_editor(config: dict, template: str = "") -> str: raw = f.read() os.remove(tmpfile) - if not raw: - raise JrnlException(Message(MsgText.NoTextReceived, MsgStyle.NORMAL)) - return raw diff --git a/tests/bdd/features/write.feature b/tests/bdd/features/write.feature index ecc1965c..f15f39e1 100644 --- a/tests/bdd/features/write.feature +++ b/tests/bdd/features/write.feature @@ -78,19 +78,19 @@ Feature: Writing new entries. Scenario Outline: Writing an empty entry from the editor should yield "No entry to save" message Given we use the config "" - And we write nothing to the editor if opened + And we append nothing to the editor if opened And we use the password "test" if prompted When we run "jrnl --edit" - Then the error output should contain "No entry to save, because no text was received" + Then the error output should contain "No edits to save, because nothing was changed" And the editor should have been called Examples: configs - | config_file | - | editor.yaml | - | editor_empty_folder.yaml | - | dayone.yaml | - | basic_encrypted.yaml | - | basic_onefile.yaml | + | config_file | + | editor.yaml | + | basic_onefile.yaml | + | basic_encrypted.yaml | + | basic_dayone.yaml | + | basic_folder.yaml | Scenario Outline: Writing an empty entry from the command line should yield "No entry to save" message Given we use the config ""