diff options
| author | Richard M. Stallman | 2005-09-04 01:28:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-09-04 01:28:41 +0000 |
| commit | 366717cfa0ff12fc544e9ee5031478e25aecf08d (patch) | |
| tree | 1dba927164ed7571d7239ada30c52a3071b7cf4d /src | |
| parent | 71f6424d02e7b287a79d1559df0057acb278ea2a (diff) | |
| download | emacs-366717cfa0ff12fc544e9ee5031478e25aecf08d.tar.gz emacs-366717cfa0ff12fc544e9ee5031478e25aecf08d.zip | |
(redisplay_internal): Make UPDATED as long as needed.
(move_it_in_display_line_to): Stop after last char on line even
on a windowing terminal, if that's the specified stop position.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index f81dfb6755a..95f5a6709bf 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -6012,6 +6012,8 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 6012 | glyphs have the same width. */ | 6012 | glyphs have the same width. */ |
| 6013 | int single_glyph_width = it->pixel_width / it->nglyphs; | 6013 | int single_glyph_width = it->pixel_width / it->nglyphs; |
| 6014 | int new_x; | 6014 | int new_x; |
| 6015 | int x_before_this_char = x; | ||
| 6016 | int hpos_before_this_char = it->hpos; | ||
| 6015 | 6017 | ||
| 6016 | for (i = 0; i < it->nglyphs; ++i, x = new_x) | 6018 | for (i = 0; i < it->nglyphs; ++i, x = new_x) |
| 6017 | { | 6019 | { |
| @@ -6043,8 +6045,22 @@ move_it_in_display_line_to (it, to_charpos, to_x, op) | |||
| 6043 | { | 6045 | { |
| 6044 | ++it->hpos; | 6046 | ++it->hpos; |
| 6045 | it->current_x = new_x; | 6047 | it->current_x = new_x; |
| 6048 | |||
| 6049 | /* The character's last glyph just barely fits | ||
| 6050 | in this row. */ | ||
| 6046 | if (i == it->nglyphs - 1) | 6051 | if (i == it->nglyphs - 1) |
| 6047 | { | 6052 | { |
| 6053 | /* If this is the destination position, | ||
| 6054 | return a position *before* it in this row, | ||
| 6055 | now that we know it fits in this row. */ | ||
| 6056 | if (BUFFER_POS_REACHED_P ()) | ||
| 6057 | { | ||
| 6058 | it->hpos = hpos_before_this_char; | ||
| 6059 | it->current_x = x_before_this_char; | ||
| 6060 | result = MOVE_POS_MATCH_OR_ZV; | ||
| 6061 | break; | ||
| 6062 | } | ||
| 6063 | |||
| 6048 | set_iterator_to_next (it, 1); | 6064 | set_iterator_to_next (it, 1); |
| 6049 | #ifdef HAVE_WINDOW_SYSTEM | 6065 | #ifdef HAVE_WINDOW_SYSTEM |
| 6050 | if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) | 6066 | if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) |
| @@ -10596,9 +10612,13 @@ redisplay_internal (preserve_echo_area) | |||
| 10596 | if (consider_all_windows_p) | 10612 | if (consider_all_windows_p) |
| 10597 | { | 10613 | { |
| 10598 | Lisp_Object tail, frame; | 10614 | Lisp_Object tail, frame; |
| 10599 | int i, n = 0, size = 50; | 10615 | int i, n = 0, size = 5; |
| 10600 | struct frame **updated | 10616 | struct frame **updated; |
| 10601 | = (struct frame **) alloca (size * sizeof *updated); | 10617 | |
| 10618 | FOR_EACH_FRAME (tail, frame) | ||
| 10619 | size++; | ||
| 10620 | |||
| 10621 | updated = (struct frame **) alloca (size * sizeof *updated); | ||
| 10602 | 10622 | ||
| 10603 | /* Recompute # windows showing selected buffer. This will be | 10623 | /* Recompute # windows showing selected buffer. This will be |
| 10604 | incremented each time such a window is displayed. */ | 10624 | incremented each time such a window is displayed. */ |