From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.bugs Subject: bug#32932: 27.0.50; render bugs on macOS Mojave Date: Thu, 1 Nov 2018 12:52:43 -0700 Message-ID: References: <20181019184828.GA2041@breton.holly.idiocy.org> <20181020200444.GA2501@breton.holly.idiocy.org> <20181024104242.GA40431@breton.holly.idiocy.org> <20181029160943.GA60662@breton.holly.idiocy.org> <20181031171253.GA69712@breton.holly.idiocy.org> <83tvl0hdn6.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1541101870 27157 195.159.176.226 (1 Nov 2018 19:51:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Nov 2018 19:51:10 +0000 (UTC) Cc: boris@d12frosted.io, 32932@debbugs.gnu.org, alan@idiocy.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 01 20:51:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIIzh-0006wh-B6 for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Nov 2018 20:51:05 +0100 Original-Received: from localhost ([::1]:43791 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIJ1n-0007Ha-Ip for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Nov 2018 15:53:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gIJ1e-0007DX-0U for bug-gnu-emacs@gnu.org; Thu, 01 Nov 2018 15:53:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gIJ1a-00045W-Ju for bug-gnu-emacs@gnu.org; Thu, 01 Nov 2018 15:53:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54562) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gIJ1a-00045O-FS for bug-gnu-emacs@gnu.org; Thu, 01 Nov 2018 15:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gIJ1a-00025d-8n for bug-gnu-emacs@gnu.org; Thu, 01 Nov 2018 15:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Aaron Jensen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Nov 2018 19:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32932 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32932-submit@debbugs.gnu.org id=B32932.15411019718017 (code B ref 32932); Thu, 01 Nov 2018 19:53:02 +0000 Original-Received: (at 32932) by debbugs.gnu.org; 1 Nov 2018 19:52:51 +0000 Original-Received: from localhost ([127.0.0.1]:58820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIJ1P-00025E-I8 for submit@debbugs.gnu.org; Thu, 01 Nov 2018 15:52:51 -0400 Original-Received: from mail-yb1-f175.google.com ([209.85.219.175]:46104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gIJ1O-000253-Gm for 32932@debbugs.gnu.org; Thu, 01 Nov 2018 15:52:50 -0400 Original-Received: by mail-yb1-f175.google.com with SMTP id f15-v6so8127859ybq.13 for <32932@debbugs.gnu.org>; Thu, 01 Nov 2018 12:52:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc:content-transfer-encoding; bh=mlyZoMdePKBIM8QoMOmoMA3kHoT98APmXxMC2THnuOc=; b=h2HVUKmJNzZIDmiwpHaDEy9ivIccUjYQOUVaj3aP8FEDHkTDBcv70KtRxcFu45ib8w L+twaVNuRrJzRriYcrheT6jzXHA3WaI7DR5s8nCK/Q4F4fPTLzlfn7gJYC6yt/a9arp4 EC+t69aKDek98VNg/v2SwOJreORB+SGqkKV85D0Y2Q8rFR+eNa6Z1ihOElOcFI//2HoP sIuy/4KwH6QwPllO9vhGK7TxUWJOjMTBe/HUG6DDqPIuwKwylY4xU0hdycYot/1MViSP +YnE0Vw7bn1l2486Nb4fnTSLr7wdschy4PfXqFx3wDnSZjenDslmhvWC7ple7cpHgynz QuFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc:content-transfer-encoding; bh=mlyZoMdePKBIM8QoMOmoMA3kHoT98APmXxMC2THnuOc=; b=jN6+km9n24RrDbFs1BYnm7I7xP3bfVky6mYletUrcsdtHJV7HL0VZoca8vtsqf3Mj0 lseZ9lUdyPrfMnPstkQv3Uk0oUhCAzElsgriybFA6kY9hgSBLZ82jOhtADnIpzNi+bHw yl0wmovuuFg4HJQKE2CRxGr7qU0CMt8cGuZqjisyDIp+W0jpc0lnrcgoCUz6Gb4KwN4F E9PuJxY5uQZzVmA3ZleRk+KPlQ4sJzr/M/DSh6SPuV/ZrPBJ4OwCpYfWiWLFiKqhP4HW VMXjHlM4pdFNdicf6EmeMleIW3DPHO8fLdeGmzxcuyopiZppErqZ1gWyEwp9Pz/aj9Vg w+ww== X-Gm-Message-State: AGRZ1gIwslSZSABMu0pJyODUexmpEuA8/fgI16Sc5D6TBnjW2onnaash j4UUm5qtDLiMspGporzvV7/u7ZMkoCtsNzgseHg= X-Google-Smtp-Source: AJdET5dh+tCKGrOVU6nqAWRXAp9v/9JXnEl6Kgmy/6amxG0wIEQfvFjpeQfwghHfZQYUDnsnnWcaeZaaFDX4n8ovk/U= X-Received: by 2002:a25:bb88:: with SMTP id y8-v6mr8967889ybg.283.1541101964686; Thu, 01 Nov 2018 12:52:44 -0700 (PDT) Original-Received: from 1058052472880 named unknown by gmailapi.google.com with HTTPREST; Thu, 1 Nov 2018 12:52:43 -0700 In-Reply-To: <83tvl0hdn6.fsf@gnu.org> X-Mailer: Airmail (528) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:151913 Archived-At: On November 1, 2018 at 11:12:14 AM, Eli Zaretskii (eliz@gnu.org(mailto:eliz@gnu.org)) wrote: > Can you find the reason for that? In general, redrawing the cursor > should only redraw a single character, and sometimes the two adjacent > ones. It shouldn't redraw more than that. > > From what you describe, it sounds like the problem is in the logic > that determines which parts to redraw, see update_text_area in > dispnew.c. dispnew.c redraws up to the end of the line in many situations. I added the following logging: =C2=A0 =C2=A0 =C2=A0 fprintf (stderr, "clear %d %d %d %d %d %d %d\n", !curr= ent_row->enabled_p =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, desired_row->y != =3D current_row->y =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, desired_row->ascen= t !=3D current_row->ascent =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, desired_row->phys_= ascent !=3D current_row->phys_ascent =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, desired_row->phys_= height !=3D current_row->phys_height =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, desired_row->visib= le_height !=3D current_row->visible_height =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, current_row->overl= apped_p); =C2=A0 =C2=A0 =C2=A0 fprintf (stderr, "desired\t%d\t%d\t%d\t%d\t%d\n" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, desired_row->y =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, desired_row->ascen= t =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, desired_row->phys_= ascent =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, desired_row->phys_= height =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, desired_row->visib= le_height); =C2=A0 =C2=A0 =C2=A0 fprintf (stderr, "current\t%d\t%d\t%d\t%d\t%d\n" =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, current_row->y =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, current_row->ascen= t =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, current_row->phys_= ascent =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, current_row->phys_= height =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0, current_row->visib= le_height); And when this happens, this is what I get: draw_glyphs x: 56 pos: 7 8 clear 0 0 1 1 1 0 0 desired 0 =C2=A0 =C2=A0 =C2=A0 15 =C2=A0 =C2=A0 =C2=A012 =C2=A0 =C2=A0 =C2= =A016 =C2=A0 =C2=A0 =C2=A019 current 0 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A0 =C2= =A0 19 =C2=A0 =C2=A0 =C2=A019 clear 1 0 0 0 0 0 0 desired 637 =C2=A0 =C2=A0 20 =C2=A0 =C2=A0 =C2=A019 =C2=A0 =C2=A0 =C2=A026 = =C2=A0 =C2=A0 =C2=A028 current 637 =C2=A0 =C2=A0 20 =C2=A0 =C2=A0 =C2=A019 =C2=A0 =C2=A0 =C2=A026 = =C2=A0 =C2=A0 =C2=A028 clear 1 0 1 1 1 1 0 desired 0 =C2=A0 =C2=A0 =C2=A0 318 =C2=A0 =C2=A0 318 =C2=A0 =C2=A0 637 =C2= =A0 =C2=A0 637 current 0 =C2=A0 =C2=A0 =C2=A0 15 =C2=A0 =C2=A0 =C2=A015 =C2=A0 =C2=A0 =C2= =A019 =C2=A0 =C2=A0 =C2=A019 clear 1 0 0 0 0 0 0 desired 0 =C2=A0 =C2=A0 =C2=A0 15 =C2=A0 =C2=A0 =C2=A012 =C2=A0 =C2=A0 =C2= =A016 =C2=A0 =C2=A0 =C2=A019 current 0 =C2=A0 =C2=A0 =C2=A0 15 =C2=A0 =C2=A0 =C2=A012 =C2=A0 =C2=A0 =C2= =A016 =C2=A0 =C2=A0 =C2=A019 So, the ascent and physics_ascent on the current row are coming back as 0. Also, the height is different. That=E2=80=99s causing it to redraw to the end of the line. AFAICT there are two issues: 1. It=E2=80=99s redrawing to the end of the line unnecessarily. 2. It=E2=80=99s clearing and then doing some other processing before actual= ly painting. If #1 was fixed, it would perhaps be better, but I wonder if the area under the cursor would be cleared the same. I tried changing the condition in update_text_area to just: if (!current_row->enabled_p) And it still reproduced, so the ascent stuff above may be a red herring=E2= =80=A6 Aaron