Re: .signature without newline bug
* Thu Sep 29 2005 Mads Martin Joergensen <mmj@xxxxxxx>
> Make a .signature without a newline in the end.
>
> Press reply to a given mail.
> Quit the editor without saving anything.
> Mutt thinks the mail have changed. <---- bug
>
> If there's a newline at the end of the signature, quitting the editor
> without saving changes makes mutt abort unmodified message.
Ah, because of fix_end_of_file() in curs_lib.c.
fix_end_of_file() is used by mutt_edit_file().
> Which file has the changed/unchanged detection code?
send.c.
time_t mtime = mutt_decrease_mtime (msg->content->filename, NULL);
...
mutt_edit_file (Editor, msg->content->filename);
...
if (stat (msg->content->filename, &st) == 0)
{
/* if the file was not modified, bail out now */
if (mtime == st.st_mtime && !msg->content->next &&
query_quadoption (OPT_ABORT, _("Abort unmodified message?")) ==
M_YES)
{
mutt_message _("Aborted unmodified message.");
goto cleanup;
}
}
Hmm, maybe fix_end_of_file() should check mtime??
Or make an option $fix_eof for you?
Otherwise, it's feature.
--
tamo