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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 17 Jul 2022 18:21:40 +0300

> Date: Sat, 16 Jul 2022 19:39:18 +0000
> From: Gregory Heytings <[email-masked]>
> cc: [email-masked]
> 
> 
> I just pushed several improvements to the feature branch.

Thanks.

I still see a segfault in get_visually_first_element.  To reproduce:

  emacs -Q
  C-x C-f long-line.xml
  C-u 12 M-g g
  C-s C-q C-j

IOW, go to line 12 and search for a newline.  I think this segfaults
because point is very far from window-start, so the narrowing doesn't
include the position where get_visually_first_element is called.

Similarly, this also segfaults:

  emacs -Q
  C-x C-f long-line.xml
  C-u 15000 M-g c
  C-x 2