Subject: bug#63187: 30.0.50; Tail of longer lines painted after end of nearby lines on macOS

From: Aaron Jensen <[email-masked]>
Date: Mon, 1 May 2023 09:55:58 -0400

On Mon, May 1, 2023 at 9:51 AM Eli Zaretskii <[email-masked]> wrote:
>
> > From: Aaron Jensen <[email-masked]>
> > Date: Mon, 1 May 2023 09:47:50 -0400
> > Cc: Po Lu <[email-masked]>, Alan Third <[email-masked]>, [email-masked]
> >
> >   {
> >     NSRect srcRect = NSMakeRect (x, from_y, width, height);
> >     NSPoint dest = NSMakePoint (x, to_y);
> >     EmacsView *view = FRAME_NS_VIEW (f);
> >
> >     [view copyRect:srcRect to:dest];
> > #ifdef NS_IMPL_COCOA
> >     [view setNeedsDisplayInRect:srcRect];
> > #endif
> >   }
> >
> > Why is the source being marked for redisplay? I would expect the
> > destination to be marked as such, or am I missing something?
>
> IMO, both should be marked for redisplay.  Or maybe I don't understand
> the significance of marking a rectangle for redisplay.

For reference, this is in `ns_scroll_run'. Only the destination is
changed, right? I imagine the source would be effectively marked when
it's copied into, so marking the source in this code would be
redundant, unless I'm missing something?