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

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

bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t


From: Eli Zaretskii
Subject: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t
Date: Sat, 06 Feb 2021 15:01:39 +0200

tags 46316 notabug
thanks

> From: ynyaaa@gmail.com
> Date: Fri, 05 Feb 2021 14:08:06 +0900
> 
> 
> (1) When isearch fails after last match
> Evaluate the form below and type 'C-s a C-s', then emacs messages
> 'Failing I-search: a' and the buffer scrolls back left and the current
> point is out of the window.
> Type C-s again, and overwrapped search succeeds at the same point,
> but the matched point is still out of the window.
> 
>   (let ((buf (generate-new-buffer "tmp")))
>     (switch-to-buffer buf)
>     (setq truncate-lines t)
>     (dotimes (i 100) (insert (format "%d\n" i)))
>     (insert-char ?x 200)
>     (insert ?a)
>     (goto-char (point-min)))
> 
> (2) When image-toggle-display
> Evaluate the form below, then the SVG image is displayed.
> Type 'C-c C-c' to view the source text and type 'C-c C-c' again to view
> the image, then the buffer keeps scrolled right and the image is hidden
> out of the window.
> Type C-a and the image is shown, type 'C-c C-c' to view the source text
> again, then the buffer keeps scrolled left and the current point is out
> of the window.
> 
>   (let ((buf (generate-new-buffer "tmp"))
>         (svg "<svg width=\"80\" height=\"80\" version=\"1.1\"\
>    xmlns=\"http://www.w3.org/2000/svg\"\
>    xmlns:xlink=\"http://www.w3.org/1999/xlink\";>\
>    <rect width=\"80\" height=\"80\" x=\"0\" y=\"0\" fill=\"blue\"></rect>\
>   </svg>"))
>     (switch-to-buffer buf)
>     (setq truncate-lines t)
>     (insert svg)
>     (image-mode))

I don't think this behavior is a bug.  We only change the hscroll of a
window when point moves, and in these two scenarios it doesn't move.
I see no reason to assume that the user will necessarily want to have
the window scroll, instead of keeping it at its current horizontal
scroll.





reply via email to

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