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

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

bug#41965: 26.3; weird behaviour of 'scroll-down-line'


From: Eli Zaretskii
Subject: bug#41965: 26.3; weird behaviour of 'scroll-down-line'
Date: Sat, 20 Jun 2020 21:59:47 +0300

[Please use Reply All to keep the bug address on the CC line.]

> Date: Sat, 20 Jun 2020 20:48:10 +0200
> From: cage <cage-dev@twistfold.it>
> 
> > Thanks, but I couldn't use this recipe to try to reproduce the
> > problem.  First there are too many closing parentheses after
> > "stopper".  More importantly, I cannot find the function
> > scroll-note-property in Emacs, and no package called annotate.el.
> >
> > So it seems like some details are missing from the recipe.
> 
> I am deeply sorry, i missed a line from the original code! :(
> 
> this is the correct one (or so I hope! ;-)):
> 
> -----8<----8<---------8<----8<----
> 
> (defun scroll-note-property ()
>   (let ((prefix-first " \n")
>         (stopper      "\n"))
>     (list 'face 'default 'display
>           (concat prefix-first
>                   (propertize "foo"
>                               'face '(:background "red" :foreground "yellow"))
>                   stopper))))
> 
> (defun scroll-note ()
>   (add-text-properties 31 32 (scroll-note-property)))
> 
> (scroll-note)
> 
> -----8<----8<---------8<----8<----

OK, now I see what you see.

However, this is the expected behavior: Emacs cannot display a window
with the window-start position inside a display property.  If you
trick Emacs into doing that, you get what you describe.

Instead of "M-x scroll-down-line RET", you need to scroll 2 lines at
that point, as in "C-u 2 M-x scroll-down-line RET".  You need to make
the window start before the display property.

This is not a bug, just a known limitation of the current display
code.





reply via email to

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