Mercurial > emacs
comparison src/window.c @ 49836:33592610b3e0
(window_scroll_pixel_based): Move outside a
multi-glyph character before setting new window start.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Tue, 18 Feb 2003 00:18:04 +0000 |
parents | 23a1cea22d13 |
children | e25cbad07868 |
comparison
equal
deleted
inserted
replaced
49835:09b19af84a81 | 49836:33592610b3e0 |
---|---|
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. |
7 | 7 |
8 GNU Emacs is free software; you can redistribute it and/or modify | 8 GNU Emacs is free software; you can redistribute it and/or modify |
4192 | 4192 |
4193 if (! vscrolled) | 4193 if (! vscrolled) |
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); |
4200 bytepos = XMARKER (w->start)->bytepos; | 4209 bytepos = XMARKER (w->start)->bytepos; |
4201 w->start_at_line_beg = ((pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n') | 4210 w->start_at_line_beg = ((pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n') |