Subject: bug#57433: Emacs no longer moves point into visible port of the buffer

From: Eli Zaretskii <[email-masked]>
Date: Sat, 27 Aug 2022 12:33:49 +0300

> Cc: [email-masked]
> From: Gerd Möllmann <[email-masked]>
> Date: Sat, 27 Aug 2022 10:53:37 +0200
> 
> Gerd Möllmann <[email-masked]> writes:
> 
> > Gerd Möllmann <[email-masked]> writes:
> >
> > a71c05b44de74fe16691f680df34c4534992e472 is the first bad commit
> >
> > I will look at the changes in simple.el soon if no-one beats me.
> 
> Hm, I must admit that I don't understand the change in line-move, or
> better said the context in which it was made.  So if I fix this I
> probably break some optimization.

The changes in line-move should only affect buffers with very long
lines.

> I have a simple recipe now, though.
> 
> emacs -Q
> 
> Insert and eval this function:
> 
> (defun hansi ()
>   (insert "line 1\n")
>   (insert (propertize "+invisible 1\ninvisible2-\n" 'invisible t))
>   (insert "line 2\n"))
> 
> M-: (hansi) RET
> C-p
> C-x =
> =>
> Char: + (43, #o53, #x2b) point=330 of 365 (90%) column=0

Why is that a problem?  I get the same result on the emacs-28 branch,
where the changes in this commit were not installed.  And the OP said
the problem is new on master.