From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95255 invoked by alias); 18 Mar 2019 14:42:42 -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 95244 invoked by uid 89); 18 Mar 2019 14:42:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=screenshots X-HELO: mail-wm1-f65.google.com Received: from mail-wm1-f65.google.com (HELO mail-wm1-f65.google.com) (209.85.128.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Mar 2019 14:42:40 +0000 Received: by mail-wm1-f65.google.com with SMTP id h18so4662172wml.1 for ; Mon, 18 Mar 2019 07:42:40 -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 u73sm5298873wmu.41.2019.03.18.07.42.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 07:42:37 -0700 (PDT) Subject: Re: [PATCH] Improve/fix the TUI's current source line highlight To: Eli Zaretskii References: <24ebd86d-ac47-bc8d-042a-e29ae2b4301e@redhat.com> <83va0hwl24.fsf@gnu.org> Cc: gdb-patches@sourceware.org, tom@tromey.com From: Pedro Alves Message-ID: Date: Mon, 18 Mar 2019 14:42: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: <83va0hwl24.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-03/txt/msg00378.txt.bz2 On 03/17/2019 03:57 PM, Eli Zaretskii wrote: >> From: Pedro Alves >> Date: Thu, 14 Mar 2019 17:35:57 +0000 >> >> This patch changes that to something that I find much more sensible -- >> only reverse the default foreground/background colors, leave styled >> text colors alone. If the foreground color is not the default (because the >> text was styled), leave the foreground color as is. If >> e.g., the terminal is fg=BLACK, and bg=WHITE, and the style wants to >> print text in RED, reverse the background color (print in BLACK), but >> still print the text in RED. >> >> I've attached screenshots of before/after patch, with both >> white-on-black (actually, linux-colors / grey-ish-on-black), >> and black-on-white themes in my console (konsole). Also attached >> screenshots with styling disabled, so that you can see how the >> after-patch versions look more like the unstyled output. >> >> Note: The new ui_file_style::set_fg method isn't called set_foreground >> instead, because set_foreground is a macro in /usr/lib/term.h (ncurses). >> >> WDYT? >> >> Eli, could you try this on Windows, see if it behaves as intended there? > > Tested on MS-Windows, works fine. I think you should push this. Great, thanks. I've merged this to master and branch, with the bool fixed. Pedro Alves