Subject: 28.2; scroll-up-line doesn't work if there is a before-string overlay with newline

From: Herman, Géza <[email-masked]>
Date: Tue, 26 Sep 2023 20:30:53 +0200

This bug exists in 28.2, but on a not too old master as well.

Repro:
  - emacs -Q
  - M-: (overlay-put (make-overlay 72 72) 'before-string "Fake line\n")
  - this will put a "Fake line" at the 2nd line of the scratch buffer, 
(between the two default scratch buffer message lines)
  - M-x scroll-up-line
  - this will correctly scroll one line up
  - M-x scroll-up-line
  - this is the bug, no scroll happens

Also, if the overlay is added at the middle of some line (not at the 
beginning like in my repro steps), then scroll-up-line will "scroll" 
until the overlay only, making the overlay to visually move the left 
side. Then further scroll-up-line commands won't have an effect.