summarylogtreecommitdiffstats
path: root/sidebar-compose.patch
blob: ed12fe93ee55e1140d8dc25e6870f00d8836d431 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From: Evgeni Golov <evgeni@debian.org>
Date: Fri, 14 Mar 2014 08:54:47 +0100
Subject: sidebar-compose

draw_sidebar sets SidebarWidth to 0 when sidebar_visible is false.
However, if you start mutt in compose mode, draw_sidebar won't be
called until the next redraw and your header lines will be off by
the width of the sidebar, even when you did not want a sidebar at
all.

Can be tested with:
  HOME=/ LC_ALL=C mutt -e 'unset sidebar_visible' -s test recipient

Closes: #502627

Gbp-Pq: Topic mutt-patched
---
 compose.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/compose.c b/compose.c
index 5a14d70..16576f2 100644
--- a/compose.c
+++ b/compose.c
@@ -32,6 +32,7 @@
 #include "mailbox.h"
 #include "sort.h"
 #include "charset.h"
+#include "sidebar.h"
 
 #ifdef MIXMASTER
 #include "remailer.h"
@@ -245,6 +246,7 @@ static void draw_envelope_addr (int line, ADDRESS *addr)
 
 static void draw_envelope (HEADER *msg, char *fcc)
 {
+  draw_sidebar (MENU_COMPOSE);
   draw_envelope_addr (HDR_FROM, msg->env->from);
   draw_envelope_addr (HDR_TO, msg->env->to);
   draw_envelope_addr (HDR_CC, msg->env->cc);