diff options
| author | Andreas Schwab | 2003-02-18 00:18:04 +0000 |
|---|---|---|
| committer | Andreas Schwab | 2003-02-18 00:18:04 +0000 |
| commit | e68def1e59711959da76178defe02c2b09e76dc0 (patch) | |
| tree | 65a4cf465ad0d4322410d47429adf5ffc25c2ff3 | |
| parent | 3824b1a682ced02fe6d634e763308b1614cbb987 (diff) | |
| download | emacs-e68def1e59711959da76178defe02c2b09e76dc0.tar.gz emacs-e68def1e59711959da76178defe02c2b09e76dc0.zip | |
(window_scroll_pixel_based): Move outside a
multi-glyph character before setting new window start.
| -rw-r--r-- | src/window.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c index 302eef2414d..3e2c3c30d1c 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Window creation, deletion and examination for GNU Emacs. | 1 | /* Window creation, deletion and examination for GNU Emacs. |
| 2 | Does not include redisplay. | 2 | Does not include redisplay. |
| 3 | Copyright (C) 1985,86,87,93,94,95,96,97,1998,2000, 2001, 2002 | 3 | Copyright (C) 1985,86,87,93,94,95,96,97,1998,2000, 2001, 2002, 2003 |
| 4 | Free Software Foundation, Inc. | 4 | Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| @@ -4194,6 +4194,15 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 4194 | { | 4194 | { |
| 4195 | int pos = IT_CHARPOS (it); | 4195 | int pos = IT_CHARPOS (it); |
| 4196 | int bytepos; | 4196 | int bytepos; |
| 4197 | |||
| 4198 | /* If in the middle of a multi-glyph character move forward to | ||
| 4199 | the next character. */ | ||
| 4200 | if (in_display_vector_p (&it)) | ||
| 4201 | { | ||
| 4202 | ++pos; | ||
| 4203 | move_it_to (&it, pos, -1, -1, -1, MOVE_TO_POS); | ||
| 4204 | } | ||
| 4205 | |||
| 4197 | /* Set the window start, and set up the window for redisplay. */ | 4206 | /* Set the window start, and set up the window for redisplay. */ |
| 4198 | set_marker_restricted (w->start, make_number (pos), | 4207 | set_marker_restricted (w->start, make_number (pos), |
| 4199 | w->buffer); | 4208 | w->buffer); |