From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: Cursors: Is superimposing the same glyph a feature? Date: Sat, 16 Feb 2019 11:00:21 +0000 Message-ID: <20190216110021.GA76552@breton.holly.idiocy.org> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="OgqxwSJOaUobr8KG" Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="259644"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.11.2 (2019-01-07) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Keith David Bershatsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 16 12:00:57 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guxiJ-0015O3-77 for ged-emacs-devel@m.gmane.org; Sat, 16 Feb 2019 12:00:55 +0100 Original-Received: from localhost ([127.0.0.1]:54589 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guxiI-0004vO-0f for ged-emacs-devel@m.gmane.org; Sat, 16 Feb 2019 06:00:54 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guxi5-0004vI-V7 for emacs-devel@gnu.org; Sat, 16 Feb 2019 06:00:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guxi3-0007v5-Vk for emacs-devel@gnu.org; Sat, 16 Feb 2019 06:00:41 -0500 Original-Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:43967) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1guxi0-0007oc-4P; Sat, 16 Feb 2019 06:00:36 -0500 Original-Received: by mail-wr1-x42d.google.com with SMTP id r2so12902068wrv.10; Sat, 16 Feb 2019 03:00:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Mmso8E7JBQCSmTUYYVURjZ3ePDd9tZEFwSKsK7tqADk=; b=LS0AVAQWFKu9HrUUr5ep8p5dRJQO88dMLgxkaS2OM2Ec0BrtaU7jL01Ztc7hSm1RIl kFSgF7721U9j6dscwuE1ZMfOXu76Fb6dRoeJinJn3mRy7SvOw1FGzk7a7nyD58ZtphJS 5NsVKnFkBII/XGWHmv2E6Lt/aV23aEeUNOy7mcxcN43XpozLHiOyBYFHHFFOpqevq6OC N8QwYqshZ7VPmZHTLD58Tx8n2wRgcwmkyuRdtrHIdAYp84VqKOr8yWG8Pvi3/042S/QS IfkiMsTu/UEfkRp8tziJls5ObjYV1OtFhhkT1sMWTtz7k03P+YOJgT38qV/ACSRi8ioA y6sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Mmso8E7JBQCSmTUYYVURjZ3ePDd9tZEFwSKsK7tqADk=; b=AsEBA109SIqlMv92hs3i+qfcHpvCGD+mCJ/I7rHp8ejdind/btw1d2LjS8JmC42sju oNbpUFDjFuUkbj7zHIaAsoyK+q+s9acECSFq7DjYCD7Xnhru1AqKjPlmm67sszC5e1ub FnzFKuu5PBhKOMI/yj89KddVwQyj9WijWgbwFl63w3FKFgjNy0x4vq2N/QE+T8ykQpcl wufgMWq0cBqRJFRjwORtu9tZD2oOCVu9NTsVG4R7k3UgSYB0vnMstvn51/2webcSzhTb jTA6XvD2E71M7QHAqlXBhmIch0Yku7NfkSx5vPVU5H1r+Sr4G4KdIMRVucm628t89sis Pjzg== X-Gm-Message-State: AHQUAuaFGQPIc4VirEigoApAAjl5rQjziPz3eAQ5pX8W33cQuaTtaD+l EhkQOdWAw4ds2NLSZgHJGjTlw2G/ X-Google-Smtp-Source: AHgI3Iax8Ofkrp63Pyw6sRFfy4Jn3waKQOBAZFg4Khct/ouGOkiIH3M4OuUtKkWb5i5pPFnC70TwYg== X-Received: by 2002:adf:c704:: with SMTP id k4mr10614010wrg.142.1550314825828; Sat, 16 Feb 2019 03:00:25 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-09e2-2523-ae0a-daeb.holly.idiocy.org. [2001:8b0:3f8:8129:9e2:2523:ae0a:daeb]) by smtp.gmail.com with ESMTPSA id o18sm27381414wrg.40.2019.02.16.03.00.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Feb 2019 03:00:24 -0800 (PST) Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233415 Archived-At: --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Fri, Feb 15, 2019 at 11:34:35PM -0800, Keith David Bershatsky wrote: > > Here are my minimal settings in the .emacs file, and then I blew-up the size of the font to get a better screenshot: > > (blink-cursor-mode -1) > > (setq default-frame-alist (list '(cursor-type . (hbar . 1)) > '(background-color . "black") > '(foreground-color . "white"))) > > You may need to blow-up the image and break-out the micrometer to > discern that the letter "A" with the HBAR_CURSOR is somewhat wider, > with more jagged edges, and the middle triangle is somewhat smaller > (because the walls of the letter "A" are thicker). This phenomenon > is more easily noticed with the naked eye when holding down the > left/right arrow key (repeating) and watching the character at point > become bold, and then the bold is removed when moving on to the next > character at point. I can see it too. I’d never noticed. I doubt very much it’s intentional. It looks like the NS port does the wrong thing here. At the moment it redraws the glyph on top of the cursor as long as CURSOR_TYPE != NO_CURSOR, but looking at an X build, it looks as though HBAR_CURSOR, for example, should cover the glyph. So I reckon we should only redraw the glyph if the cursor is filled box or hollow box. Patch attached. -- Alan Third --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-Prevent-redrawing-the-glyph-on-top-of-bar-cursors.patch" >From 1638ac50070d6802329eae13eeba7926ed4c9149 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sat, 16 Feb 2019 10:56:13 +0000 Subject: [PATCH] Prevent redrawing the glyph on top of bar cursors * src/nsterm.m (ns_draw_window_cursor): Limit when we redraw the glyph. --- src/nsterm.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index bbd2c84214..5d2b0a0812 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3126,8 +3126,9 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. break; } - /* draw the character under the cursor */ - if (cursor_type != NO_CURSOR) + /* Draw the character under the cursor. Other terms only draw + the character on top of box cursors, so do the same here. */ + if (cursor_type == FILLED_BOX_CURSOR || cursor_type == HOLLOW_BOX_CURSOR) draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR); ns_reset_clipping (f); -- 2.20.1 --OgqxwSJOaUobr8KG--