- decrease file size when truncating it for editing so detecting changes works again...
authorpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sat, 11 Feb 2006 23:36:46 +0000 (23:36 +0000)
committerpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sat, 11 Feb 2006 23:36:46 +0000 (23:36 +0000)
git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@781 e385b8ad-14ed-0310-8656-cc95a2468c6d

VERSION.svn
editmsg.c

index d2d648e..394a6cf 100644 (file)
@@ -1 +1 @@
-780
+781
index a11a5e4..529838c 100644 (file)
--- a/editmsg.c
+++ b/editmsg.c
@@ -95,7 +95,7 @@ static int edit_one_message (CONTEXT * ctx, HEADER * cur)
    * remove it, the message will grow by one line each time the user edits
    * the message.
    */
    * remove it, the message will grow by one line each time the user edits
    * the message.
    */
-  if (sb.st_size != 0 && truncate (tmp, sb.st_size - 1) == -1) {
+  if (size != 0 && truncate (tmp, --size) == -1) {
     mutt_error (_("could not truncate temporary mail folder: %s"),
                 strerror (errno));
     goto bail;
     mutt_error (_("could not truncate temporary mail folder: %s"),
                 strerror (errno));
     goto bail;