From f436dff43b1138c30490dfcc2b8bdd60576dd78a Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 21 Feb 2024 20:31:57 +0000 Subject: [PATCH] Defer deletion of any color menu options untill the final menu (in the selected language) has been loaded. --- usr.sbin/sysinst/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.sbin/sysinst/main.c b/usr.sbin/sysinst/main.c index 293041428462..f0148b26a497 100644 --- a/usr.sbin/sysinst/main.c +++ b/usr.sbin/sysinst/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.32 2023/12/17 18:46:42 martin Exp $ */ +/* $NetBSD: main.c,v 1.33 2024/02/21 20:31:57 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -288,8 +288,6 @@ main(int argc, char **argv) if (has_colors()) { start_color(); do_coloring(clr_arg.fg,clr_arg.bg); - } else { - remove_color_options(); } msg_window(mainwin); @@ -310,6 +308,10 @@ main(int argc, char **argv) get_kb_encoding(); init_lang(); + /* remove some invalid menu entries */ + if (!has_colors()) + remove_color_options(); + /* Menu processing */ if (partman_go) partman(NULL);