Subject: bug#56393: Actually fix the long lines display bug

From: Gregory Heytings <[email-masked]>
Date: Sat, 09 Jul 2022 11:12:05 +0000

>
> Here's one problem caused by using PT in get_narrowed_begv:
>
>  emacs -Q
>  C-x C-f src/xdisp.c RET
>  C-x 2
>  M->
>
> Now move the mouse pointer over the "other" window, the one which still 
> shows xdisp.c at BOB, and turn the mouse wheel to scroll the window 
> towards the end of the buffer.  This segfaults:
>
> The problem is that narrowed_begv was computed using PT, which doesn't 
> correspond to the window's point, and so the logic in 
> get_visually_first_element backfires.
>

Yes, I understand and noted that I should use window-point instead of PT.