Subject: bug#14582: 24.3.50.1; Strange overlay behavior, when window-start is inside an overlay.

From: Michael Heerdegen <[email-masked]>
Date: Tue, 01 Feb 2022 04:03:04 +0100

Eli Zaretskii <[email-masked]> writes:

> Then please provide a full, self-contained recipe starting from "emacs
> -Q" that uses hideshow.  The only recipe I saw and analyzed in this
> bug was the original one, which did set window-start.  Perhaps you are
> talking about a different issue.

I think I mean the same.  I guess the original recipe only explicitly
sets window-start to ensure the recipe reliably works regardless of the
number of display lines and such things.

Anyway, this here works for me:

Open emacs -Q (I'm in X), and evaluate (with M-:) the follow piece of code:

#+begin_src emacs-lisp
(progn
  (dotimes (_ 33) (insert "\
\(defun foo ()
  1
  2)\n"))
  (goto-char (point-max))
  (sit-for 1)
  (scroll-down)
  (sit-for 1)
  (hs-minor-mode)
  (hs-hide-all))
#+end_src

That gives me a display of *scratch* where the first visible window line
displays "...)" instead of expected "(defun xyz nil...)".

Michael.