Drop empty notes after editing.
Keeping empty notes doesn't make sense here. Also, there doesn't seem to be a simple way to erase notes yet. This will make calcurse delete any notes that are empty (meaning that they are either 0-byte files or contain nothing but a newline character) when returning from the editor. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -503,6 +503,9 @@ todo_edit_note (char *editor)
|
||||
}
|
||||
(void)snprintf (fullname, BUFSIZ, "%s%s", path_notes, i->note);
|
||||
wins_launch_external (fullname, editor);
|
||||
|
||||
if (io_file_is_empty (fullname))
|
||||
erase_note (&i->note, ERASE_FORCE);
|
||||
}
|
||||
|
||||
/* View a note previously attached to a todo */
|
||||
|
||||
Reference in New Issue
Block a user