From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#31988: scroll-other-window broken on master Date: Thu, 28 Jun 2018 00:26:33 +0300 Message-ID: <87sh57ncom.fsf@tcd.ie> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1530134710 10920 195.159.176.226 (27 Jun 2018 21:25:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2018 21:25:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 31988@debbugs.gnu.org To: "Daniel Colascione" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 27 23:25:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYHw0-0002gY-7V for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jun 2018 23:25:04 +0200 Original-Received: from localhost ([::1]:33308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYHy7-0001sY-84 for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Jun 2018 17:27:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYHxz-0001rH-U5 for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2018 17:27:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYHxv-0005OA-Tx for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2018 17:27:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58275) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYHxv-0005NR-Mx for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2018 17:27:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fYHxv-0003fQ-GI for bug-gnu-emacs@gnu.org; Wed, 27 Jun 2018 17:27:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jun 2018 21:27:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31988 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31988-submit@debbugs.gnu.org id=B31988.153013481114063 (code B ref 31988); Wed, 27 Jun 2018 21:27:03 +0000 Original-Received: (at 31988) by debbugs.gnu.org; 27 Jun 2018 21:26:51 +0000 Original-Received: from localhost ([127.0.0.1]:37936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYHxj-0003ek-H4 for submit@debbugs.gnu.org; Wed, 27 Jun 2018 17:26:51 -0400 Original-Received: from mail-wr0-f178.google.com ([209.85.128.178]:38181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fYHxf-0003eG-5o for 31988@debbugs.gnu.org; Wed, 27 Jun 2018 17:26:47 -0400 Original-Received: by mail-wr0-f178.google.com with SMTP id e18-v6so3396887wrs.5 for <31988@debbugs.gnu.org>; Wed, 27 Jun 2018 14:26:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=AlUrdf2RMNAXE/yZwRg+s7OV6TLrL28u82MU8cSwRwo=; b=h3y9LaVmADUQnEOhAa/8nVbwgvBbiH4rwZlp9gX3WLnvtEvkumAPruuHO5uH2V9LWv FXP9/ja54IpdQZd1Ltof1j+IxrmfcXjfg0PtdaR+jFNM4Dpbx5AEFjEavHOIR+Ckl5a7 kkNv2bOdD2wrVFVjPWNAur2UHXSH0UUmwQANo+QGB3HkxxHLmH0mnK0SQ6SlGWcf1N9F 76SBU1WHuQQ1c1B5tUSomfIucEuIN1VztvbG6jSN4RTCKDoN5CWYy/KjP+BBx7vDhYKe 3AcY8Di/cDlG1YVGVluUlrO9wGHVX5iKYgNJJ4/oq2zbKeYhVhJmMxgzX8ZzCx6zJhUF +weA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=AlUrdf2RMNAXE/yZwRg+s7OV6TLrL28u82MU8cSwRwo=; b=Na60qZ/By+lEpSpvNEb9xa0OBVfQ/b7M+7kHZ6rLlcbxsL8GOuJW9kr58J0S1Ikazv yh6orJ80QCaFYqePPYyWCt85f1IuW+mMxOA395zGfUNP3gzXVOPpIClVFPVHhxBU55Ix yXcJb3YqmQZIxm4uZWfcyrsHp5/k9GO/4Whyq2d0jxtrPPW+dWQM9lqPqrSZ8BnRlWI8 AZxNOG7559F0jEzCzpxqhcsZ/8jmV/dITM5y3+znw0vZQu5tV0dV1/OhbXTR3S4yB46f LBcJphg50/qt0u8+DjDIzaLjOEK/42rHnilhJYQiPDplol4+BD/hbe47SjH1g5WMEDWw ouJg== X-Gm-Message-State: APt69E38nOcQXHjh097ZGcS71RzyQZ4jTcGaUWrKAnkpK1pIyGt7vDoV BRRbN4fdbU/+aAwpQBXc3FjRBOf/ X-Google-Smtp-Source: AAOMgpfloYW8BUiRHYQnxyb3FLErIFAqLsrGsz0UJn7ZPj6K9Ekrzt59OBa7IJOwy5beJoJQj9D6QQ== X-Received: by 2002:adf:9ed0:: with SMTP id b16-v6mr3673309wrf.170.1530134801324; Wed, 27 Jun 2018 14:26:41 -0700 (PDT) Original-Received: from localhost (adsl-96.91.140.91.tellas.gr. [91.140.91.96]) by smtp.gmail.com with ESMTPSA id u6-v6sm6136070wrm.60.2018.06.27.14.26.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Jun 2018 14:26:40 -0700 (PDT) In-Reply-To: (Daniel Colascione's message of "Wed, 27 Jun 2018 13:44:47 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147880 Archived-At: --=-=-= Content-Type: text/plain tags 31988 patch quit "Daniel Colascione" writes: > Basil, it looks like you recently rewrote a big chunk of the window > scrolling code. Can you please take a look? > > Thanks. > >> scroll-other-window scrolls the current window _and_ the other window. To >> repro, visit a big file, C-x 2, and mash C-M-v. Only the other window >> should scroll. Now, both windows scroll. This bug was indeed introduced by my recent refactor. Does the following patch fix it? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-other-window-scroll-when-showing-same-buffer.patch >From 026b6befc40795d8597e036f930f634b2a17e4f3 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Thu, 28 Jun 2018 00:13:07 +0300 Subject: [PATCH] Fix other window scroll when showing same buffer src/window.c (scroll_command): Make other window's buffer current before scrolling, even when displaying the same buffer. (bug#31988) --- src/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.c b/src/window.c index 81fd7f2b47..42b9522862 100644 --- a/src/window.c +++ b/src/window.c @@ -5654,7 +5654,7 @@ scroll_command (Lisp_Object window, Lisp_Object n, int direction) /* If given window's buffer isn't current, make it current for the moment. But don't screw up if window_scroll gets an error. */ - if (XBUFFER (w->contents) != current_buffer) + if (other_window || XBUFFER (w->contents) != current_buffer) { record_unwind_protect_excursion (); Fset_buffer (w->contents); -- 2.18.0 --=-=-= Content-Type: text/plain Thanks, -- Basil --=-=-=--