This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Improve/fix the TUI's current source line highlight


> Date: Fri, 15 Mar 2019 16:38:37 +0000 (UTC)
> From: "Hannes Domani via gdb-patches" <gdb-patches@sourceware.org>
> 
> Also, I had to add the following to make it work on windows
> (but beware, I'm using pdcurses, not ncurses, and I don't know if ncurses
> for windows needs this as well):

Ncurses doesn't need this.

> --- a/gdb/tui/tui-io.c
> +++ b/gdb/tui/tui-io.c
> @@ -369,6 +386,17 @@ apply_ansi_escape (WINDOW *w, const char *buf)
> 
>    if (reverse_mode_p)
>      {
> +#if defined(__MINGW32__)
> +      if (style.get_foreground ().is_basic ()
> +         && style.get_foreground ().get_value ()
> +         == (ncurses_norm_attr & 15))
> +       style.set_fg (ui_file_style::NONE);
> +      if (style.get_background ().is_basic ()
> +         && style.get_background ().get_value ()
> +         == ((ncurses_norm_attr >> 4) & 15))
> +       style.set_bg (ui_file_style::NONE);
> +#endif
> +

Could you describe what happens with pdcurses if you don't make this
change?  It's strange that pdcurses cannot use explicit color
specification if the color is the default one.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]