bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31276: 27.0.50; "Spurious" empty first line from before-string


From: Eli Zaretskii
Subject: bug#31276: 27.0.50; "Spurious" empty first line from before-string
Date: Sat, 28 Apr 2018 12:40:58 +0300

> From: Stefan Monnier <address@hidden>
> Date: Thu, 26 Apr 2018 16:11:38 -0400
> 
> Package: Emacs
> Version: 27.0.50
> 
> 
> Try the following:
> 
>     % src/emacs -Q etc/NEWS --eval '(let ((ol (make-overlay (+ (point) 10) (+ 
> (point) 10)))) (overlay-put ol (quote before-string) "\nhello\n"))'
>     C-u 1 C-v
> 
> You should see that the "scroll by 1 line" didn't actually scroll: it just
> removed the "GNU Emacs " from your sight and left an empty line instead.

After "C-u 1 C-v", type C-p, then type "C-u 1 C-v" again.  What do you
see?  Does what you see change your idea about where the bug is?

> Whether you consider this as a bug report or a feature request, my point
> is that when the window starts with a before/after-string and that
> string starts with a line-feed, we should skip that line-feed rather
> than waste a perfectly good line.

I don't understand: are you arguing that we should ignore newlines in
overlay strings when they happen to appear at the beginning of the
window?  It sounds very strange to me to do so.  Whoever puts the
newlines there does that for a reason, and I'm sure will object to
having them effectively removed in some situations.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]