tweaks: reshuffle a statement, to have major initialization in nano.c
parent
8535b3db4c
commit
b535714671
|
@ -66,9 +66,6 @@ void set_interface_colorpairs(void)
|
|||
{
|
||||
bool using_defaults = FALSE;
|
||||
|
||||
/* Tell ncurses to enable colors. */
|
||||
start_color();
|
||||
|
||||
#ifdef HAVE_USE_DEFAULT_COLORS
|
||||
/* Allow using the default colors, if available. */
|
||||
using_defaults = (use_default_colors() != ERR);
|
||||
|
|
|
@ -2271,10 +2271,12 @@ int main(int argc, char **argv)
|
|||
started_curses = TRUE;
|
||||
|
||||
#ifdef ENABLE_COLOR
|
||||
/* On capable terminals, use colors, otherwise use just reverse or bold.*/
|
||||
if (has_colors())
|
||||
/* If the terminal can do colors, tell ncurses to switch them on, and
|
||||
* initialize the interface ones. Otherwise just use reverse or bold.*/
|
||||
if (has_colors()) {
|
||||
start_color();
|
||||
set_interface_colorpairs();
|
||||
else
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
interface_color_pair[TITLE_BAR] = hilite_attribute;
|
||||
|
|
Loading…
Reference in New Issue