Commit a0986e60 a0986e609067cd04d268457bb8ffb603403791a0 by Sergey Poznyakoff

mhn: minor fix in edit mode.

* mh/mhn.c (mhn_edit): Increase line_count after outputting
a line with a stripped-off initial #.
1 parent 7cff1869
......@@ -2493,7 +2493,10 @@ mhn_edit (struct compose_env *env, int level)
if (buf[0] == '#')
{
if (buf[1] == '#')
mu_stream_write (output, buf+1, n-1, NULL);
{
mu_stream_write (output, buf+1, n-1, NULL);
line_count++;
}
else
{
char *b2 = NULL;
......@@ -2518,13 +2521,15 @@ mhn_edit (struct compose_env *env, int level)
}
free (b2);
mu_stream_close (output);
mu_stream_destroy (&output);
if (line_count)
/* Close and append the previous part */
finish_text_msg (env, &msg, ascii_buf);
{
/* Close and append the previous part */
mu_stream_close (output);
mu_stream_destroy (&output);
finish_text_msg (env, &msg, ascii_buf);
}
mu_rtrim_cset (buf, "\n");
/* Execute the directive */
......
......@@ -364,7 +364,8 @@ Initial text.
[mhn: don't know how to display content (content application/x-tar in message 1, part 2)
])
MH_CHECK([mhn-show- variable (with subtype)],[mhn15 mhn-show-with-subtype],[
MH_CHECK([mhn-show- variable (with subtype)],
[mhn15 mhn-show-with-subtype],[
MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mime,[Mail/inbox])
echo "mhn-show-application/x-tar: %ltar tvf '%F'" >> $MH
mhn -show 1 | sed '/^X-IMAPbase/d;s/ *$//'
......@@ -387,7 +388,8 @@ part 2 application/x-tar 13835
-rw-r--r-- gray/staff 937 2010-11-29 13:58 Jabberwocky
])
MH_CHECK([mhn-show- variable (with subtype)],[mhn16 mhn-show-without-subtype],[
MH_CHECK([mhn-show- variable (without subtype)],
[mhn16 mhn-show-without-subtype],[
MUT_MBCOPY($abs_top_srcdir/testsuite/mh/mime,[Mail/inbox])
echo "mhn-show-application: %ltar tvf '%F'" >> $MH
mhn -show 1 | sed '/^X-IMAPbase/d;s/ *$//'
......