GNU bug report logs - #46316
27.1; wrong horizontal scroll with truncate-lines value t

Previous Next

Package: emacs;

Reported by: ynyaaa <at> gmail.com

Date: Fri, 5 Feb 2021 05:09:02 UTC

Severity: normal

Tags: notabug

Found in version 27.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: ynyaaa <at> gmail.com
Cc: 46316 <at> debbugs.gnu.org
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 <at> 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.




This bug report was last modified 4 years and 121 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.