]> git.eshelyaron.com Git - emacs.git/commitdiff
Limit "other window" scrolling to current terminal
authorBasil L. Contovounesios <contovob@tcd.ie>
Mon, 30 Apr 2018 17:02:15 +0000 (18:02 +0100)
committerNoam Postavsky <npostavs@gmail.com>
Thu, 10 May 2018 23:04:11 +0000 (19:04 -0400)
* src/window.c (Fother_window_for_scrolling): Limit next-window
search to visible frames on the current terminal. (bug#30207)

src/window.c

index e6d0280d9b0024a0af18f0e64dd781692092e5a3..59c942202948941e61b2a6c0de540c1a9152be87 100644 (file)
@@ -5709,8 +5709,7 @@ specifies the window.  This takes precedence over
       && !NILP (Vminibuf_scroll_window))
     window = Vminibuf_scroll_window;
   /* If buffer is specified and live, scroll that buffer.  */
-  else if (!NILP (Vother_window_scroll_buffer)
-          && BUFFERP (Vother_window_scroll_buffer)
+  else if (BUFFERP (Vother_window_scroll_buffer)
           && BUFFER_LIVE_P (XBUFFER (Vother_window_scroll_buffer)))
     {
       window = Fget_buffer_window (Vother_window_scroll_buffer, Qnil);
@@ -5725,11 +5724,8 @@ specifies the window.  This takes precedence over
 
       if (EQ (window, selected_window))
        /* That didn't get us anywhere; look for a window on another
-           visible frame.  */
-       do
-         window = Fnext_window (window, Qnil, Qt);
-       while (! FRAME_VISIBLE_P (XFRAME (WINDOW_FRAME (XWINDOW (window))))
-              && ! EQ (window, selected_window));
+           visible frame on the current terminal.  */
+        window = Fnext_window (window, Qnil, Qvisible);
     }
 
   CHECK_LIVE_WINDOW (window);