From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124705 invoked by alias); 18 Mar 2019 14:45:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 124545 invoked by uid 89); 18 Mar 2019 14:45:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: mail-wr1-f65.google.com Received: from mail-wr1-f65.google.com (HELO mail-wr1-f65.google.com) (209.85.221.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Mar 2019 14:45:14 +0000 Received: by mail-wr1-f65.google.com with SMTP id t5so17365985wri.7 for ; Mon, 18 Mar 2019 07:45:09 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id o63sm9012452wmo.46.2019.03.18.07.45.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 07:45:07 -0700 (PDT) Subject: Re: [PATCH] Improve/fix the TUI's current source line highlight To: Hannes Domani , GDB Patches References: <6ada07d6-ff84-e215-19ff-0a17563390c6@redhat.com> <186859064.9289078.1552667917410@mail.yahoo.com> <83r2b5wkl5.fsf@gnu.org> <844158233.10369297.1552841197833@mail.yahoo.com> From: Pedro Alves Message-ID: Date: Mon, 18 Mar 2019 14:45:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <844158233.10369297.1552841197833@mail.yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2019-03/txt/msg00379.txt.bz2 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 Folgendes geschrieben: >>> Date: Fri, 15 Mar 2019 16:38:37 +0000 (UTC)> > From: "Hannes Domani via gdb-patches" > > > > 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