From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#46316: 27.1; wrong horizontal scroll with truncate-lines value t Date: Sat, 06 Feb 2021 15:01:39 +0200 Message-ID: <83mtwhnydo.fsf@gnu.org> References: <86wnvnm79l.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20704"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46316@debbugs.gnu.org To: ynyaaa@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 06 14:02:20 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l8NEC-0005HK-Aa for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Feb 2021 14:02:20 +0100 Original-Received: from localhost ([::1]:49022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8NEB-00059p-9k for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 06 Feb 2021 08:02:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l8NDu-00059Z-NA for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2021 08:02:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33879) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l8NDu-0005k5-Fi for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2021 08:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l8NDu-0002FR-CG for bug-gnu-emacs@gnu.org; Sat, 06 Feb 2021 08:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Feb 2021 13:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46316 X-GNU-PR-Package: emacs Original-Received: via spool by 46316-submit@debbugs.gnu.org id=B46316.16126165068620 (code B ref 46316); Sat, 06 Feb 2021 13:02:02 +0000 Original-Received: (at 46316) by debbugs.gnu.org; 6 Feb 2021 13:01:46 +0000 Original-Received: from localhost ([127.0.0.1]:45425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8NDe-0002Es-5x for submit@debbugs.gnu.org; Sat, 06 Feb 2021 08:01:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8NDc-0002Ea-9v; Sat, 06 Feb 2021 08:01:44 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38736) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l8NDW-0005Wa-2A; Sat, 06 Feb 2021 08:01:38 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1889 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l8NDQ-0007kT-TJ; Sat, 06 Feb 2021 08:01:34 -0500 In-Reply-To: <86wnvnm79l.fsf@gmail.com> (ynyaaa@gmail.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199435 Archived-At: 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 " xmlns=\"http://www.w3.org/2000/svg\"\ > xmlns:xlink=\"http://www.w3.org/1999/xlink\">\ > \ > ")) > (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.