changeset 34748:e978a3fb2690

(hscroll_window_tree): Take window's min_hscroll into account.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 20 Dec 2000 15:36:56 +0000
parents b17790c2efbf
children 3a0a4c2b6633
files src/xdisp.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Wed Dec 20 15:36:29 2000 +0000
+++ b/src/xdisp.c	Wed Dec 20 15:36:56 2000 +0000
@@ -7601,13 +7601,15 @@
 	      /* 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;
 		}
 	    }