aboutsummaryrefslogtreecommitdiffstats
path: root/src/note.c
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2020-11-15 09:21:47 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2020-11-15 12:11:27 -0500
commite3dd92ef71ecd06ef2a3ef2ef49beccb5d22cc0f (patch)
treec3b670ef7c5c8a79167926965d138acdf0c1bc48 /src/note.c
parente1b5580bdf323959b08054cceec01174b9d33ded (diff)
downloadcalcurse-e3dd92ef71ecd06ef2a3ef2ef49beccb5d22cc0f.tar.gz
calcurse-e3dd92ef71ecd06ef2a3ef2ef49beccb5d22cc0f.zip
Do not remove an empty note file after edit session
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/note.c')
-rw-r--r--src/note.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/note.c b/src/note.c
index 40e0882..4f20d9d 100644
--- a/src/note.c
+++ b/src/note.c
@@ -94,9 +94,7 @@ void edit_note(char **note, const char *editor)
const char *arg[] = { editor, tmppath, NULL };
wins_launch_external(arg);
- if (io_file_is_empty(tmppath) > 0) {
- erase_note(note);
- } else if ((fp = fopen(tmppath, "r"))) {
+ if ((fp = fopen(tmppath, "r"))) {
sha1_stream(fp, sha1);
fclose(fp);
*note = sha1;