From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.bugs Subject: bug#63187: 30.0.50; Tail of longer lines painted after end of nearby lines on macOS Date: Mon, 1 May 2023 18:40:15 -0400 Message-ID: References: <87ilddec31.fsf@yahoo.com> <87edo0exct.fsf@yahoo.com> <83wn1sns1n.fsf@gnu.org> <87pm7kchqw.fsf@yahoo.com> <83pm7knpzi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38253"; mail-complaints-to="usenet@ciao.gmane.io" To: Alan Third , Eli Zaretskii , Po Lu , 63187@debbugs.gnu.org, aaronjensen@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 02 00:41:22 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ptcCv-0009jH-Ma for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 May 2023 00:41:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptcCf-0001JX-Ao; Mon, 01 May 2023 18:41:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptcCd-0001JP-Bd for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 18:41:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ptcCc-0000GK-ST for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 18:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ptcCc-0000sp-DN for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 18:41: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: Mon, 01 May 2023 22:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63187 X-GNU-PR-Package: emacs Original-Received: via spool by 63187-submit@debbugs.gnu.org id=B63187.16829808353344 (code B ref 63187); Mon, 01 May 2023 22:41:02 +0000 Original-Received: (at 63187) by debbugs.gnu.org; 1 May 2023 22:40:35 +0000 Original-Received: from localhost ([127.0.0.1]:41214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptcCB-0000rs-Bw for submit@debbugs.gnu.org; Mon, 01 May 2023 18:40:35 -0400 Original-Received: from mail-pj1-f42.google.com ([209.85.216.42]:56382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptcC8-0000rb-Gd for 63187@debbugs.gnu.org; Mon, 01 May 2023 18:40:33 -0400 Original-Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-24e14a24c9dso688069a91.0 for <63187@debbugs.gnu.org>; Mon, 01 May 2023 15:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682980826; x=1685572826; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fVjxjqcmNRzywQXZDgOoYPdFTRuoWnwkMkAP5qp60jU=; b=g3agqmygV+k/cFq5ddFBft93ItwZi5MdPk+c0mGUI0H6+xuiPY9ifh2faow0/C3HHv 27+qddcl8BzHRVOHr7DrnpE3SvJx/JiSw3kDHFnSVJpJQdWOgu5Z2jTmV+9oVzoDC2sp DZJEEmmibdq/QXRVhW0nP8jugHdsNjkmboloCD/OouG1JVfGiANGLaZT5qXWYbMnOfXO DyFLDoM3kCbeHkcI0apc78O37w7S0XlABcodWdyzQOGINmLipiQMVU1Tkw/tVJR0eZ/2 Dj/Z62vbqhuBllDstTdbbQq+Jq/0XPQ1A+tlowHYtaWFod3AuN+yNnK0qeePb1hC8GT3 7dFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682980826; x=1685572826; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fVjxjqcmNRzywQXZDgOoYPdFTRuoWnwkMkAP5qp60jU=; b=hRs2/XgMPZZq9o0U6kdCUVi/3ubRjy0j+jR1aj1WAxeRncsn0O+ip54gDmcnhzCJXm 4enS38dXiR8GH7048QrtQ06h/z/634tRTq/t/0Dgnc9XqH5AvB0Ua1OTj3f/8IoEMnUp OMVsjllWmX9s7UjAOjkPG83LjUOfm8dSPLrWOA0fEbDMGRMdb130epMdDjDq37UUhdcn nmXH28KsdiNuZn9aHk3/6ppcbjTWjIJUlx2OOeeG+l0qvAJSN5DVj7AISFi6MaXAZIds D+1si0RglBqBMm5yRwzmAG8J0+GK5gjBnCKEQzJ4QnVsK2nB0vM7pFc/jU79yQh/Cq7P XT2Q== X-Gm-Message-State: AC+VfDzlGuDsqpcGJcE41va3q6n/yLEeD05WaLlwbCXOM2jwXwoPPtWy kJbIxUQRVk7L2FHezCwfUa+lDgE2RU67uyd2F+A= X-Google-Smtp-Source: ACHHUZ7qu4pzkHRwMbB+TDpkcaiTQXULc9qZ6wu7JkSuD6RnsYdkqxqgRFzm6U43T49deFiG6OJIgX6SVIkrKz7VyHw= X-Received: by 2002:a17:90b:1803:b0:247:603a:bd60 with SMTP id lw3-20020a17090b180300b00247603abd60mr15281664pjb.45.1682980826398; Mon, 01 May 2023 15:40:26 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260895 Archived-At: On Mon, May 1, 2023 at 1:26=E2=80=AFPM Alan Third wrote: > > This is one of the many reasons I walked away from the NS port. ;) You are missed :) > I'm 99% certain that [EmacsView copyRect:] is correct. I went over it > numerous times. It's just doing a simple copy of one rectangle of a > graphics buffer to another, identically sized, rectangle. It handles > overlapping rectangles and there's really not very much logic in it to > go wrong. > > Po Lu asks about how it synchronises with the system, and it doesn't > really have to. The system draws into the same buffer that copyRect > accesses. It does make me wonder if there's a rare occasion when > copyRect is called and the system hasn't flushed all it's drawing > instructions to the buffer yet. It's probably possible to force it to > flush by doing something like: > > [[NSGraphicsContext currentContext] flushGraphics]; > > at the top of copyRect. Preferably only on macOS 10.14 and above, but > it probably makes no difference on other platforms since scrollRect > should force a flush anyway. > > My memory of Aaron's previous bug report about this was that it looked > like, in some cases at least, the rectangle being copied was too wide > and copyRect, not being very smart, was just wrapping off the edge of > the buffer onto the next row of pixels, but I couldn't find any reason > for that to happen since afaik all the callers check the Emacs window > size so should never ask to copy a too-wide rectangle. This one seems to be more about longer lines ghosting onto the tail end of shorter lines. You could imagine that if you had a long line and a short line, then scrolled such that the short line was where the long line was but only repainted the area there were glyphs, the new short line would include the tail end of the long line: window line 2: xxxxxxxxxxxxxx window line 3: yyyyyyyyyy -> window 1: xxxxxxxxxxxxxx window 2: yyyyyyyyyyxxxx What do you think about what I mentioned later in the thread about: [view setNeedsDisplayInRect:srcRect]; Why would that be srcRect and not destRect? Could that cause this somehow? Thanks, Aaron