Skip to content

Commit

Permalink
create HelpBar after colours
Browse files Browse the repository at this point in the history
The HelpBar has a colour observer, so it needs to be created after the
colours are initialised.
  • Loading branch information
flatcap committed Nov 25, 2023
1 parent f800045 commit 512e01e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,18 +779,21 @@ main
if (!OptNoCurses && !isatty(1))
goto main_curses;

/* Always create the mutt_windows because batch mode has some shared code
* paths that end up referencing them. */
rootwin_new();

/* This must come before mutt_init() because curses needs to be started
* before calling the init_pair() function to set the color scheme. */
if (!OptNoCurses)
{
int crc = start_curses();
if (crc != 0)
goto main_curses; // TEST08: can't test -- fake term?
}

/* Always create the mutt_windows because batch mode has some shared code
* paths that end up referencing them. */
rootwin_new();

if (!OptNoCurses)
{
/* check whether terminal status is supported (must follow curses init) */
TsSupported = mutt_ts_capability();
mutt_resize_screen();
Expand Down

0 comments on commit 512e01e

Please sign in to comment.