Commit ee66d1d8 authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Create R_MENU redraw option.

Previously, the R_INDEX option meant both the index as well as all
other menus.  The removal of the OPTFORCEREDRAWINDEX option caused problems
with redrawing other menus for options such as arrow_cursor.

One solution would be change R_INDEX back to meaning "everything"
except pager, but there are only a handful of options that affect
other menus.

Instead, create R_MENU to indicate options that affect either all
menus or one of the other menus beside the index and pager.
parent 508d3ec8
......@@ -1806,6 +1806,8 @@ static void mutt_restore_default (struct option_t *p)
if (p->flags & R_SIDEBAR)
mutt_set_current_menu_redraw (REDRAW_SIDEBAR);
#endif
if (p->flags & R_MENU)
mutt_set_current_menu_redraw_full ();
}
static size_t escape_string (char *dst, size_t len, const char* src)
......@@ -2584,6 +2586,8 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err)
if (MuttVars[idx].flags & R_SIDEBAR)
mutt_set_current_menu_redraw (REDRAW_SIDEBAR);
#endif
if (MuttVars[idx].flags & R_MENU)
mutt_set_current_menu_redraw_full ();
}
}
return (r);
......
......@@ -57,14 +57,15 @@
/* forced redraw/resort types */
#define R_NONE 0
#define R_INDEX (1<<0)
#define R_PAGER (1<<1)
#define R_INDEX (1<<0) /* redraw the index menu (MENU_MAIN) */
#define R_PAGER (1<<1) /* redraw the pager menu */
#define R_RESORT (1<<2) /* resort the mailbox */
#define R_RESORT_SUB (1<<3) /* resort subthreads */
#define R_RESORT_INIT (1<<4) /* resort from scratch */
#define R_TREE (1<<5) /* redraw the thread tree */
#define R_REFLOW (1<<6) /* reflow window layout and full redraw */
#define R_SIDEBAR (1<<7) /* redraw the sidebar */
#define R_MENU (1<<8) /* redraw all menus */
#define R_BOTH (R_INDEX | R_PAGER)
#define R_RESORT_BOTH (R_RESORT | R_RESORT_SUB)
......@@ -152,7 +153,7 @@ struct option_t MuttVars[] = {
** and give it the same color as your attachment color (see also
** $$crypt_timestamp).
*/
{ "arrow_cursor", DT_BOOL, R_BOTH, OPTARROWCURSOR, 0 },
{ "arrow_cursor", DT_BOOL, R_MENU, OPTARROWCURSOR, 0 },
/*
** .pp
** When \fIset\fP, an arrow (``->'') will be used to indicate the current entry
......@@ -405,7 +406,7 @@ struct option_t MuttVars[] = {
** When \fIunset\fP, Mutt will not collapse a thread if it contains any
** unread messages.
*/
{ "compose_format", DT_STR, R_BOTH, UL &ComposeFormat, UL "-- Mutt: Compose [Approx. msg size: %l Atts: %a]%>-" },
{ "compose_format", DT_STR, R_MENU, UL &ComposeFormat, UL "-- Mutt: Compose [Approx. msg size: %l Atts: %a]%>-" },
/*
** .pp
** Controls the format of the status line displayed in the ``compose''
......@@ -604,7 +605,7 @@ struct option_t MuttVars[] = {
** If \fI``no''\fP, never attempt to verify cryptographic signatures.
** (Crypto only)
*/
{ "date_format", DT_STR, R_BOTH, UL &DateFmt, UL "!%a, %b %d, %Y at %I:%M:%S%p %Z" },
{ "date_format", DT_STR, R_MENU, UL &DateFmt, UL "!%a, %b %d, %Y at %I:%M:%S%p %Z" },
/*
** .pp
** This variable controls the format of the date printed by the ``%d''
......@@ -814,7 +815,7 @@ struct option_t MuttVars[] = {
** you use ``+'' or ``='' for any other variables since expansion takes place
** when handling the ``$mailboxes'' command.
*/
{ "folder_format", DT_STR, R_INDEX, UL &FolderFormat, UL "%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %f" },
{ "folder_format", DT_STR, R_MENU, UL &FolderFormat, UL "%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %f" },
/*
** .pp
** This variable allows you to customize the file browser display to your
......@@ -1107,14 +1108,14 @@ struct option_t MuttVars[] = {
** Also see $$use_domain and $$hidden_host.
*/
#ifdef HAVE_LIBIDN
{ "idn_decode", DT_BOOL, R_BOTH, OPTIDNDECODE, 1},
{ "idn_decode", DT_BOOL, R_MENU, OPTIDNDECODE, 1},
/*
** .pp
** When \fIset\fP, Mutt will show you international domain names decoded.
** Note: You can use IDNs for addresses even if this is \fIunset\fP.
** This variable only affects decoding. (IDN only)
*/
{ "idn_encode", DT_BOOL, R_BOTH, OPTIDNENCODE, 1},
{ "idn_encode", DT_BOOL, R_MENU, OPTIDNENCODE, 1},
/*
** .pp
** When \fIset\fP, Mutt will encode international domain names using
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment