diff options
| author | Richard M. Stallman | 1998-04-02 04:40:52 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-04-02 04:40:52 +0000 |
| commit | 4a4c24d09e1a8ee6e0f682a56352832a78f57e80 (patch) | |
| tree | ed2fce1e7da3be0835d18c8389c8ff71cec994dd /src | |
| parent | 0c10ee28b4e045d513d80f61c2ce70d9410d14bc (diff) | |
| download | emacs-4a4c24d09e1a8ee6e0f682a56352832a78f57e80.tar.gz emacs-4a4c24d09e1a8ee6e0f682a56352832a78f57e80.zip | |
(redisplay_window): Fix computing pos from last_point.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 95024e79c4a..dfc64cb1ff7 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2033,14 +2033,16 @@ redisplay_window (window, just_this_one, preserve_echo_area) | |||
| 2033 | { | 2033 | { |
| 2034 | int last_point = XFASTINT (w->last_point); | 2034 | int last_point = XFASTINT (w->last_point); |
| 2035 | int last_point_byte = CHAR_TO_BYTE (last_point); | 2035 | int last_point_byte = CHAR_TO_BYTE (last_point); |
| 2036 | int tab_offset = (pos_tab_offset (w, last_point, last_point_byte) | ||
| 2037 | - (last_point_x + hscroll - !! hscroll)); | ||
| 2036 | 2038 | ||
| 2037 | pos = *compute_motion (last_point, last_point_y, last_point_x, 0, | 2039 | pos = *compute_motion (last_point, last_point_y, last_point_x, 0, |
| 2038 | PT, height, | 2040 | PT, height, |
| 2039 | /* BUG FIX: See the comment of | 2041 | /* BUG FIX: See the comment of |
| 2040 | Fpos_visible_in_window_p (window.c). */ | 2042 | Fpos_visible_in_window_p (window.c). */ |
| 2041 | - (1 << (BITS_PER_SHORT - 1)), | 2043 | - (1 << (BITS_PER_SHORT - 1)), |
| 2042 | width, hscroll, | 2044 | width, hscroll, |
| 2043 | pos_tab_offset (w, last_point, last_point_byte), | 2045 | tab_offset, |
| 2044 | w); | 2046 | w); |
| 2045 | } | 2047 | } |
| 2046 | else | 2048 | else |
| @@ -3048,9 +3050,10 @@ fix_glyph (f, glyph, cface) | |||
| 3048 | } | 3050 | } |
| 3049 | 3051 | ||
| 3050 | /* Return the column of position POS / POS_BYTE in window W's buffer. | 3052 | /* Return the column of position POS / POS_BYTE in window W's buffer. |
| 3051 | The result is rounded down to a multiple of the internal width of W. | 3053 | When used on the character at the beginning of a line, |
| 3052 | This is the amount of indentation of position POS | 3054 | starting at column 0, this says how much to subtract from |
| 3053 | that is not visible in its horizontal position in the window. */ | 3055 | the column position of any character in the line |
| 3056 | to get its horizontal position on the screen. */ | ||
| 3054 | 3057 | ||
| 3055 | static int | 3058 | static int |
| 3056 | pos_tab_offset (w, pos, pos_byte) | 3059 | pos_tab_offset (w, pos, pos_byte) |