aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2003-11-18 23:44:11 +0000
committerKim F. Storm2003-11-18 23:44:11 +0000
commit29b3ea63f264a8a324c6fc756e8983273de17d12 (patch)
treeca7f325feb41d504d178a5136261fbeb04caee6c /src
parent674351829a7f06a79cfc4d21a29bab1e2f666ed9 (diff)
downloademacs-29b3ea63f264a8a324c6fc756e8983273de17d12.tar.gz
emacs-29b3ea63f264a8a324c6fc756e8983273de17d12.zip
(init_iterator): Initialize it->start to position
before reseating (in case start position is invisible). (init_to_row_start): Set it->start to row-start. (redisplay_window): Accept optional_new_start if start position is invisible (in which case IT_CHARPOS overshoots PT). (display_line): Setup row->start from it->start (rather than it->current which is wrong if first char on line is invisible). When done, reseat it->start to it->current (= start of next row). (expose_area): Fix exposure of text area when first char (e.g. TAB) is only partially visible.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 4a32cea2b6e..1686dec68c5 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2180,6 +2180,8 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id)
2180 else 2180 else
2181 IT_BYTEPOS (*it) = bytepos; 2181 IT_BYTEPOS (*it) = bytepos;
2182 2182
2183 it->start = it->current;
2184
2183 /* Compute faces etc. */ 2185 /* Compute faces etc. */
2184 reseat (it, it->current.pos, 1); 2186 reseat (it, it->current.pos, 1);
2185 } 2187 }
@@ -2443,6 +2445,7 @@ init_to_row_start (it, w, row)
2443 struct glyph_row *row; 2445 struct glyph_row *row;
2444{ 2446{
2445 init_from_display_pos (it, w, &row->start); 2447 init_from_display_pos (it, w, &row->start);
2448 it->start = row->start;
2446 it->continuation_lines_width = row->continuation_lines_width; 2449 it->continuation_lines_width = row->continuation_lines_width;
2447 CHECK_IT (it); 2450 CHECK_IT (it);
2448} 2451}
@@ -11580,6 +11583,11 @@ redisplay_window (window, just_this_one_p)
11580 MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); 11583 MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
11581 if (IT_CHARPOS (it) == PT) 11584 if (IT_CHARPOS (it) == PT)
11582 w->force_start = Qt; 11585 w->force_start = Qt;
11586 /* IT may overshoot PT if text at PT is invisible. */
11587 else if (IT_CHARPOS (it) > PT && CHARPOS (startp) <= PT)
11588 w->force_start = Qt;
11589
11590
11583 } 11591 }
11584 11592
11585 /* Handle case where place to start displaying has been specified, 11593 /* Handle case where place to start displaying has been specified,
@@ -14330,7 +14338,7 @@ display_line (it)
14330 prepare_desired_row (row); 14338 prepare_desired_row (row);
14331 14339
14332 row->y = it->current_y; 14340 row->y = it->current_y;
14333 row->start = it->current; 14341 row->start = it->start;
14334 row->continuation_lines_width = it->continuation_lines_width; 14342 row->continuation_lines_width = it->continuation_lines_width;
14335 row->displays_text_p = 1; 14343 row->displays_text_p = 1;
14336 row->starts_in_middle_of_char_p = it->starts_in_middle_of_char_p; 14344 row->starts_in_middle_of_char_p = it->starts_in_middle_of_char_p;
@@ -14721,6 +14729,7 @@ display_line (it)
14721 it->current_y += row->height; 14729 it->current_y += row->height;
14722 ++it->vpos; 14730 ++it->vpos;
14723 ++it->glyph_row; 14731 ++it->glyph_row;
14732 it->start = it->current;
14724 return row->displays_text_p; 14733 return row->displays_text_p;
14725} 14734}
14726 14735
@@ -20284,9 +20293,9 @@ expose_area (w, row, r, area)
20284 AREA. The first glyph of the text area can be partially visible. 20293 AREA. The first glyph of the text area can be partially visible.
20285 The first glyphs of other areas cannot. */ 20294 The first glyphs of other areas cannot. */
20286 start_x = window_box_left_offset (w, area); 20295 start_x = window_box_left_offset (w, area);
20287 if (area == TEXT_AREA)
20288 start_x += row->x;
20289 x = start_x; 20296 x = start_x;
20297 if (area == TEXT_AREA)
20298 x += row->x;
20290 20299
20291 /* Find the first glyph that must be redrawn. */ 20300 /* Find the first glyph that must be redrawn. */
20292 while (first < end 20301 while (first < end