[PATCH] Improve/fix the TUI's current source line highlight
Pedro Alves
palves@redhat.com
Mon Mar 18 14:45:00 GMT 2019
On 03/17/2019 04:46 PM, Hannes Domani via gdb-patches wrote:
> Am Sonntag, 17. März 2019, 17:07:46 MEZ hat Eli Zaretskii <eliz@gnu.org> Folgendes geschrieben:
>>> 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.
> Actually, you can disregard that.
> Before you added that fix for windows, I found a different workaround,it was to set the "normal" color in esc.style to gray.
> I forgot that I did that, and it backfired now.So I removed that again, and everything is fine now even without that above change.
> Sorry for the noise.
No worries, thanks for following through and for testing.
The patch is in master and 8.3 branch now.
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list