]> git.eshelyaron.com Git - emacs.git/commitdiff
(hscroll_window_tree): Take window's min_hscroll
authorGerd Moellmann <gerd@gnu.org>
Wed, 20 Dec 2000 15:36:56 +0000 (15:36 +0000)
committerGerd Moellmann <gerd@gnu.org>
Wed, 20 Dec 2000 15:36:56 +0000 (15:36 +0000)
into account.

src/xdisp.c

index e72ca02e6e6f34334aebca42f8cbc0e715d86e29..3f8f5d762bf87674fc5b2b60382e6de075043e39 100644 (file)
@@ -7601,13 +7601,15 @@ hscroll_window_tree (window)
              /* Center cursor in window.  */
              hscroll = (max (0, it.current_x - text_area_width / 2)
                         / CANON_X_UNIT (it.f));
+             hscroll = max (hscroll, XFASTINT (w->min_hscroll));
 
              /* Don't call Fset_window_hscroll if value hasn't
                 changed because it will prevent redisplay
                 optimizations.  */
              if (XFASTINT (w->hscroll) != hscroll)
                {
-                 Fset_window_hscroll (window, make_number (hscroll));
+                 XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1;
+                 w->hscroll = make_number (hscroll);
                  hscrolled_p = 1;
                }
            }