diff options
| author | Gerd Moellmann | 2000-12-20 15:36:56 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-12-20 15:36:56 +0000 |
| commit | 3172f70b5186d88bd4bb12da05dcf15a172c631a (patch) | |
| tree | f9318a7ef1b8caef358e4054165314ad15131e21 /src | |
| parent | ea68264b3a95bb010cbfb6a5724d797caef07b48 (diff) | |
| download | emacs-3172f70b5186d88bd4bb12da05dcf15a172c631a.tar.gz emacs-3172f70b5186d88bd4bb12da05dcf15a172c631a.zip | |
(hscroll_window_tree): Take window's min_hscroll
into account.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index e72ca02e6e6..3f8f5d762bf 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -7601,13 +7601,15 @@ hscroll_window_tree (window) | |||
| 7601 | /* Center cursor in window. */ | 7601 | /* Center cursor in window. */ |
| 7602 | hscroll = (max (0, it.current_x - text_area_width / 2) | 7602 | hscroll = (max (0, it.current_x - text_area_width / 2) |
| 7603 | / CANON_X_UNIT (it.f)); | 7603 | / CANON_X_UNIT (it.f)); |
| 7604 | hscroll = max (hscroll, XFASTINT (w->min_hscroll)); | ||
| 7604 | 7605 | ||
| 7605 | /* Don't call Fset_window_hscroll if value hasn't | 7606 | /* Don't call Fset_window_hscroll if value hasn't |
| 7606 | changed because it will prevent redisplay | 7607 | changed because it will prevent redisplay |
| 7607 | optimizations. */ | 7608 | optimizations. */ |
| 7608 | if (XFASTINT (w->hscroll) != hscroll) | 7609 | if (XFASTINT (w->hscroll) != hscroll) |
| 7609 | { | 7610 | { |
| 7610 | Fset_window_hscroll (window, make_number (hscroll)); | 7611 | XBUFFER (w->buffer)->prevent_redisplay_optimizations_p = 1; |
| 7612 | w->hscroll = make_number (hscroll); | ||
| 7611 | hscrolled_p = 1; | 7613 | hscrolled_p = 1; |
| 7612 | } | 7614 | } |
| 7613 | } | 7615 | } |