diff options
| -rw-r--r-- | src/xdisp.c | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 9d88cff44b8..d0fa8a16e39 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1839,13 +1839,37 @@ redisplay_window (window, just_this_one, preserve_echo_area) | |||
| 1839 | { | 1839 | { |
| 1840 | int this_scroll_margin = scroll_margin; | 1840 | int this_scroll_margin = scroll_margin; |
| 1841 | 1841 | ||
| 1842 | pos = *compute_motion (startp, 0, (hscroll ? 1 - hscroll : 0), 0, | 1842 | /* Find where PT is located now on the frame. */ |
| 1843 | PT, height, | 1843 | if (PT == w->last_point) |
| 1844 | /* BUG FIX: See the comment of | 1844 | { |
| 1845 | Fpos_visible_in_window_p (window.c). */ | 1845 | pos.hpos = (w->last_point_x |
| 1846 | - (1 << (BITS_PER_SHORT - 1)), | 1846 | + (hscroll ? 1 - hscroll : 0) |
| 1847 | width, hscroll, | 1847 | - WINDOW_LEFT_MARGIN (w)); |
| 1848 | pos_tab_offset (w, startp), w); | 1848 | pos.vpos = w->last_point_y; |
| 1849 | pos.bufpos = PT; | ||
| 1850 | } | ||
| 1851 | else if (PT > w->last_point) | ||
| 1852 | { | ||
| 1853 | pos = *compute_motion (w->last_point, w->last_point_y, | ||
| 1854 | w->last_point_x + (hscroll ? 1 - hscroll : 0), | ||
| 1855 | 0, | ||
| 1856 | PT, height, | ||
| 1857 | /* BUG FIX: See the comment of | ||
| 1858 | Fpos_visible_in_window_p (window.c). */ | ||
| 1859 | - (1 << (BITS_PER_SHORT - 1)), | ||
| 1860 | width, hscroll, | ||
| 1861 | pos_tab_offset (w, startp), w); | ||
| 1862 | } | ||
| 1863 | else | ||
| 1864 | { | ||
| 1865 | pos = *compute_motion (startp, 0, (hscroll ? 1 - hscroll : 0), 0, | ||
| 1866 | PT, height, | ||
| 1867 | /* BUG FIX: See the comment of | ||
| 1868 | Fpos_visible_in_window_p (window.c). */ | ||
| 1869 | - (1 << (BITS_PER_SHORT - 1)), | ||
| 1870 | width, hscroll, | ||
| 1871 | pos_tab_offset (w, startp), w); | ||
| 1872 | } | ||
| 1849 | 1873 | ||
| 1850 | /* Don't use a scroll margin that is negative or too large. */ | 1874 | /* Don't use a scroll margin that is negative or too large. */ |
| 1851 | if (this_scroll_margin < 0) | 1875 | if (this_scroll_margin < 0) |