* menuconfig doesn't reset terminal colors correctly
@ 2016-03-20 11:35 Richard Leitner
2016-03-28 16:10 ` Richard Leitner
0 siblings, 1 reply; 2+ messages in thread
From: Richard Leitner @ 2016-03-20 11:35 UTC (permalink / raw)
To: yann.morin.1998, linux-kbuild
Hello,
I just noticed that "make menuconfig" doesn't reset the terminal colors correctly.
I'm running a XFCE Terminal with "xterm" emulation setting configured with black on white.
After "make menuconfig" exits all terminal output is white on black.
I've added fprintf's with the ANSI reset code for stdout and stderr to the mconf.c:handle_exit:
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -969,6 +969,10 @@ static int handle_exit(void)
end_dialog(saved_x, saved_y);
+ /* reset terminal */
+ fprintf(stdout, "\033[0m");
+ fprintf(stderr, "\033[0m");
+
switch (res) {
case 0:
if (conf_write(filename)) {
Basically this works for my tests, but I'm not sure if this is a desired solution...
Any comments? Should I prepare a patch for that or is this approach completely wrong?
thanks & regards,
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: menuconfig doesn't reset terminal colors correctly
2016-03-20 11:35 menuconfig doesn't reset terminal colors correctly Richard Leitner
@ 2016-03-28 16:10 ` Richard Leitner
0 siblings, 0 replies; 2+ messages in thread
From: Richard Leitner @ 2016-03-28 16:10 UTC (permalink / raw)
To: yann.morin.1998, linux-kbuild
Hi,
any updates on this?
On Sun, 20 Mar 2016 12:35:50 +0100
Richard Leitner <dev@g0hl1n.net> wrote:
> Hello,
> I just noticed that "make menuconfig" doesn't reset the terminal
> colors correctly. I'm running a XFCE Terminal with "xterm" emulation
> setting and configured with black on white. After "make menuconfig"
> exits all terminal output is white on black.
>
> I've added fprintf's with the ANSI reset code for stdout and stderr
> to the mconf.c:handle_exit:
>
> --- a/scripts/kconfig/mconf.c
> +++ b/scripts/kconfig/mconf.c
> @@ -969,6 +969,10 @@ static int handle_exit(void)
>
> end_dialog(saved_x, saved_y);
>
> + /* reset terminal */
> + fprintf(stdout, "\033[0m");
> + fprintf(stderr, "\033[0m");
> +
> switch (res) {
> case 0:
> if (conf_write(filename)) {
>
>
> Basically this works for my tests, but I'm not sure if this is a
> desired solution... Any comments? Should I prepare a patch for that
> or is this approach completely wrong?
>
> thanks & regards,
> Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-28 16:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-20 11:35 menuconfig doesn't reset terminal colors correctly Richard Leitner
2016-03-28 16:10 ` Richard Leitner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).