aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2012-07-07 19:36:02 +0300
committerEli Zaretskii2012-07-07 19:36:02 +0300
commit58dd0aa4c5a1e67d5b78a14e98b9da1a1433fbb4 (patch)
tree6f388bcf243d9a45882532bd1e196604ca78c961 /src
parent8a70567414af07cb4c12505c87c08b7a9b7de973 (diff)
downloademacs-58dd0aa4c5a1e67d5b78a14e98b9da1a1433fbb4.tar.gz
emacs-58dd0aa4c5a1e67d5b78a14e98b9da1a1433fbb4.zip
Fix bug #11832 with truncated lines when fringes are disabled on GUI frames.
src/xdisp.c (init_iterator): Get dimensions of truncation and continuation glyphs even if on GUI frames. Adjust it->last_visible_x on GUI frames when the left or right fringes, or both, are absent. (start_display, move_it_in_display_line_to): Handle the case of a GUI frame without a fringe to display continuation or truncation glyphs. (insert_left_trunc_glyphs): Support GUI frames: make sure truncation glyphs overwrite enough glyphs from the current line to have sufficient space in pixels. (display_line): Support truncation and continuation glyphs on GUI frames. If some spare pixels are left on the line after inserting the truncation glyphs, fill that space with a stretch glyph of a suitably computed width. src/term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not produce_glyphs, to support GUI sessions.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog22
-rw-r--r--src/term.c2
-rw-r--r--src/xdisp.c239
3 files changed, 208 insertions, 55 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9b76d795249..5eeace9beaf 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,25 @@
12012-07-07 Eli Zaretskii <eliz@gnu.org>
2
3 Support truncation and continuation glyphs on GUI frames, when
4 fringes are disabled. (Bug#11832)
5 * xdisp.c (init_iterator): Get dimensions of truncation and
6 continuation glyphs even if on GUI frames. Adjust
7 it->last_visible_x on GUI frames when the left or right fringes,
8 or both, are absent.
9 (start_display, move_it_in_display_line_to): Handle the case of a
10 GUI frame without a fringe to display continuation or truncation
11 glyphs.
12 (insert_left_trunc_glyphs): Support GUI frames: make sure
13 truncation glyphs overwrite enough glyphs from the current line to
14 have sufficient space in pixels.
15 (display_line): Support truncation and continuation glyphs on GUI
16 frames. If some spare pixels are left on the line after inserting
17 the truncation glyphs, fill that space with a stretch glyph of a
18 suitably computed width.
19
20 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
21 produce_glyphs, to support GUI sessions.
22
12012-07-07 Paul Eggert <eggert@cs.ucla.edu> 232012-07-07 Paul Eggert <eggert@cs.ucla.edu>
2 24
3 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781). 25 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
diff --git a/src/term.c b/src/term.c
index 5e48cbbfc64..900818559cd 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1940,7 +1940,7 @@ produce_special_glyphs (struct it *it, enum display_element_type what)
1940 temp_it.face_id = GLYPH_FACE (glyph); 1940 temp_it.face_id = GLYPH_FACE (glyph);
1941 temp_it.len = CHAR_BYTES (temp_it.c); 1941 temp_it.len = CHAR_BYTES (temp_it.c);
1942 1942
1943 produce_glyphs (&temp_it); 1943 PRODUCE_GLYPHS (&temp_it);
1944 it->pixel_width = temp_it.pixel_width; 1944 it->pixel_width = temp_it.pixel_width;
1945 it->nglyphs = temp_it.pixel_width; 1945 it->nglyphs = temp_it.pixel_width;
1946} 1946}
diff --git a/src/xdisp.c b/src/xdisp.c
index 0684a68444e..87f2e365198 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2731,31 +2731,28 @@ init_iterator (struct it *it, struct window *w,
2731 it->line_wrap = TRUNCATE; 2731 it->line_wrap = TRUNCATE;
2732 2732
2733 /* Get dimensions of truncation and continuation glyphs. These are 2733 /* Get dimensions of truncation and continuation glyphs. These are
2734 displayed as fringe bitmaps under X, so we don't need them for such 2734 displayed as fringe bitmaps under X, but we need them for such
2735 frames. */ 2735 frames when the fringes are turned off. */
2736 if (!FRAME_WINDOW_P (it->f)) 2736 if (it->line_wrap == TRUNCATE)
2737 { 2737 {
2738 if (it->line_wrap == TRUNCATE) 2738 /* We will need the truncation glyph. */
2739 { 2739 eassert (it->glyph_row == NULL);
2740 /* We will need the truncation glyph. */ 2740 produce_special_glyphs (it, IT_TRUNCATION);
2741 eassert (it->glyph_row == NULL); 2741 it->truncation_pixel_width = it->pixel_width;
2742 produce_special_glyphs (it, IT_TRUNCATION); 2742 }
2743 it->truncation_pixel_width = it->pixel_width; 2743 else
2744 } 2744 {
2745 else 2745 /* We will need the continuation glyph. */
2746 { 2746 eassert (it->glyph_row == NULL);
2747 /* We will need the continuation glyph. */ 2747 produce_special_glyphs (it, IT_CONTINUATION);
2748 eassert (it->glyph_row == NULL); 2748 it->continuation_pixel_width = it->pixel_width;
2749 produce_special_glyphs (it, IT_CONTINUATION);
2750 it->continuation_pixel_width = it->pixel_width;
2751 }
2752
2753 /* Reset these values to zero because the produce_special_glyphs
2754 above has changed them. */
2755 it->pixel_width = it->ascent = it->descent = 0;
2756 it->phys_ascent = it->phys_descent = 0;
2757 } 2749 }
2758 2750
2751 /* Reset these values to zero because the produce_special_glyphs
2752 above has changed them. */
2753 it->pixel_width = it->ascent = it->descent = 0;
2754 it->phys_ascent = it->phys_descent = 0;
2755
2759 /* Set this after getting the dimensions of truncation and 2756 /* Set this after getting the dimensions of truncation and
2760 continuation glyphs, so that we don't produce glyphs when calling 2757 continuation glyphs, so that we don't produce glyphs when calling
2761 produce_special_glyphs, above. */ 2758 produce_special_glyphs, above. */
@@ -2783,11 +2780,14 @@ init_iterator (struct it *it, struct window *w,
2783 it->last_visible_x = (it->first_visible_x 2780 it->last_visible_x = (it->first_visible_x
2784 + window_box_width (w, TEXT_AREA)); 2781 + window_box_width (w, TEXT_AREA));
2785 2782
2786 /* If we truncate lines, leave room for the truncator glyph(s) at 2783 /* If we truncate lines, leave room for the truncation glyph(s) at
2787 the right margin. Otherwise, leave room for the continuation 2784 the right margin. Otherwise, leave room for the continuation
2788 glyph(s). Truncation and continuation glyphs are not inserted 2785 glyph(s). Done only if the window has no fringes. Since we
2789 for window-based redisplay. */ 2786 don't know at this point whether there will be any R2L lines in
2790 if (!FRAME_WINDOW_P (it->f)) 2787 the window, we reserve space for truncation/continuation glyphs
2788 even if only one of the fringes is absent. */
2789 if (WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0
2790 || (it->bidi_p && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0))
2791 { 2791 {
2792 if (it->line_wrap == TRUNCATE) 2792 if (it->line_wrap == TRUNCATE)
2793 it->last_visible_x -= it->truncation_pixel_width; 2793 it->last_visible_x -= it->truncation_pixel_width;
@@ -2923,7 +2923,10 @@ start_display (struct it *it, struct window *w, struct text_pos pos)
2923 /* Or it fits exactly and we're on a window 2923 /* Or it fits exactly and we're on a window
2924 system frame. */ 2924 system frame. */
2925 || (new_x == it->last_visible_x 2925 || (new_x == it->last_visible_x
2926 && FRAME_WINDOW_P (it->f)))) 2926 && FRAME_WINDOW_P (it->f)
2927 && ((it->bidi_p && it->bidi_it.paragraph_dir == R2L)
2928 ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
2929 : WINDOW_RIGHT_FRINGE_WIDTH (it->w)))))
2927 { 2930 {
2928 if ((it->current.dpvec_index >= 0 2931 if ((it->current.dpvec_index >= 0
2929 || it->current.overlay_string_index >= 0) 2932 || it->current.overlay_string_index >= 0)
@@ -8327,7 +8330,10 @@ move_it_in_display_line_to (struct it *it,
8327 /* Or it fits exactly and we're on a window 8330 /* Or it fits exactly and we're on a window
8328 system frame. */ 8331 system frame. */
8329 || (new_x == it->last_visible_x 8332 || (new_x == it->last_visible_x
8330 && FRAME_WINDOW_P (it->f)))) 8333 && FRAME_WINDOW_P (it->f)
8334 && ((it->bidi_p && it->bidi_it.paragraph_dir == R2L)
8335 ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
8336 : WINDOW_RIGHT_FRINGE_WIDTH (it->w)))))
8331 { 8337 {
8332 if (/* IT->hpos == 0 means the very first glyph 8338 if (/* IT->hpos == 0 means the very first glyph
8333 doesn't fit on the line, e.g. a wide image. */ 8339 doesn't fit on the line, e.g. a wide image. */
@@ -8509,6 +8515,9 @@ move_it_in_display_line_to (struct it *it,
8509 && it->current_x >= it->last_visible_x) 8515 && it->current_x >= it->last_visible_x)
8510 { 8516 {
8511 if (!FRAME_WINDOW_P (it->f) 8517 if (!FRAME_WINDOW_P (it->f)
8518 || ((it->bidi_p && it->bidi_it.paragraph_dir == R2L)
8519 ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
8520 : WINDOW_RIGHT_FRINGE_WIDTH (it->w))
8512 || IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) 8521 || IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
8513 { 8522 {
8514 int at_eob_p = 0; 8523 int at_eob_p = 0;
@@ -18203,11 +18212,8 @@ get_overlay_arrow_glyph_row (struct window *w, Lisp_Object overlay_arrow_string)
18203} 18212}
18204 18213
18205 18214
18206/* Insert truncation glyphs at the start of IT->glyph_row. Truncation 18215/* Insert truncation glyphs at the start of IT->glyph_row. Which
18207 glyphs are only inserted for terminal frames since we can't really 18216 glyphs to insert is determined by produce_special_glyphs. */
18208 win with truncation glyphs when partially visible glyphs are
18209 involved. Which glyphs to insert is determined by
18210 produce_special_glyphs. */
18211 18217
18212static void 18218static void
18213insert_left_trunc_glyphs (struct it *it) 18219insert_left_trunc_glyphs (struct it *it)
@@ -18215,7 +18221,11 @@ insert_left_trunc_glyphs (struct it *it)
18215 struct it truncate_it; 18221 struct it truncate_it;
18216 struct glyph *from, *end, *to, *toend; 18222 struct glyph *from, *end, *to, *toend;
18217 18223
18218 eassert (!FRAME_WINDOW_P (it->f)); 18224 eassert (!FRAME_WINDOW_P (it->f)
18225 || (!it->glyph_row->reversed_p
18226 && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0)
18227 || (it->glyph_row->reversed_p
18228 && WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0));
18219 18229
18220 /* Get the truncation glyphs. */ 18230 /* Get the truncation glyphs. */
18221 truncate_it = *it; 18231 truncate_it = *it;
@@ -18230,20 +18240,66 @@ insert_left_trunc_glyphs (struct it *it)
18230 /* Overwrite glyphs from IT with truncation glyphs. */ 18240 /* Overwrite glyphs from IT with truncation glyphs. */
18231 if (!it->glyph_row->reversed_p) 18241 if (!it->glyph_row->reversed_p)
18232 { 18242 {
18243 short tused = truncate_it.glyph_row->used[TEXT_AREA];
18244
18233 from = truncate_it.glyph_row->glyphs[TEXT_AREA]; 18245 from = truncate_it.glyph_row->glyphs[TEXT_AREA];
18234 end = from + truncate_it.glyph_row->used[TEXT_AREA]; 18246 end = from + tused;
18235 to = it->glyph_row->glyphs[TEXT_AREA]; 18247 to = it->glyph_row->glyphs[TEXT_AREA];
18236 toend = to + it->glyph_row->used[TEXT_AREA]; 18248 toend = to + it->glyph_row->used[TEXT_AREA];
18249 if (FRAME_WINDOW_P (it->f))
18250 {
18251 /* On GUI frames, when variable-size fonts are displayed,
18252 the truncation glyphs may need more pixels than the row's
18253 glyphs they overwrite. We overwrite more glyphs to free
18254 enough screen real estate, and enlarge the stretch glyph
18255 on the right (see display_line), if there is one, to
18256 preserve the screen position of the truncation glyphs on
18257 the right. */
18258 int w = 0;
18259 struct glyph *g = to;
18260 short used;
18261
18262 while (g < toend && it->glyph_row->x + w < 0)
18263 {
18264 w += g->pixel_width;
18265 ++g;
18266 }
18267 it->glyph_row->x = 0;
18268 w = 0;
18269 while (g < toend && w < it->truncation_pixel_width)
18270 {
18271 w += g->pixel_width;
18272 ++g;
18273 }
18274 if (g - to - tused > 0)
18275 {
18276 memmove (to + tused, g, toend - g);
18277 it->glyph_row->used[TEXT_AREA] -= g - to - tused;
18278 }
18279 used = it->glyph_row->used[TEXT_AREA];
18280 if (it->glyph_row->truncated_on_right_p
18281 && WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0
18282 && it->glyph_row->glyphs[TEXT_AREA][used - 2].type
18283 == STRETCH_GLYPH)
18284 {
18285 int extra = w - it->truncation_pixel_width;
18286
18287 it->glyph_row->glyphs[TEXT_AREA][used - 2].pixel_width += extra;
18288 }
18289 }
18237 18290
18238 while (from < end) 18291 while (from < end)
18239 *to++ = *from++; 18292 *to++ = *from++;
18240 18293
18241 /* There may be padding glyphs left over. Overwrite them too. */ 18294 /* There may be padding glyphs left over. Overwrite them too. */
18242 while (to < toend && CHAR_GLYPH_PADDING_P (*to)) 18295 if (!FRAME_WINDOW_P (it->f))
18243 { 18296 {
18244 from = truncate_it.glyph_row->glyphs[TEXT_AREA]; 18297 while (to < toend && CHAR_GLYPH_PADDING_P (*to))
18245 while (from < end) 18298 {
18246 *to++ = *from++; 18299 from = truncate_it.glyph_row->glyphs[TEXT_AREA];
18300 while (from < end)
18301 *to++ = *from++;
18302 }
18247 } 18303 }
18248 18304
18249 if (to > toend) 18305 if (to > toend)
@@ -18251,22 +18307,48 @@ insert_left_trunc_glyphs (struct it *it)
18251 } 18307 }
18252 else 18308 else
18253 { 18309 {
18310 short tused = truncate_it.glyph_row->used[TEXT_AREA];
18311
18254 /* In R2L rows, overwrite the last (rightmost) glyphs, and do 18312 /* In R2L rows, overwrite the last (rightmost) glyphs, and do
18255 that back to front. */ 18313 that back to front. */
18256 end = truncate_it.glyph_row->glyphs[TEXT_AREA]; 18314 end = truncate_it.glyph_row->glyphs[TEXT_AREA];
18257 from = end + truncate_it.glyph_row->used[TEXT_AREA] - 1; 18315 from = end + truncate_it.glyph_row->used[TEXT_AREA] - 1;
18258 toend = it->glyph_row->glyphs[TEXT_AREA]; 18316 toend = it->glyph_row->glyphs[TEXT_AREA];
18259 to = toend + it->glyph_row->used[TEXT_AREA] - 1; 18317 to = toend + it->glyph_row->used[TEXT_AREA] - 1;
18318 if (FRAME_WINDOW_P (it->f))
18319 {
18320 int w = 0;
18321 struct glyph *g = to;
18322
18323 while (g >= toend && w < it->truncation_pixel_width)
18324 {
18325 w += g->pixel_width;
18326 --g;
18327 }
18328 if (to - g - tused > 0)
18329 to = g + tused;
18330 if (it->glyph_row->truncated_on_right_p
18331 && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0
18332 && it->glyph_row->glyphs[TEXT_AREA][1].type == STRETCH_GLYPH)
18333 {
18334 int extra = w - it->truncation_pixel_width;
18335
18336 it->glyph_row->glyphs[TEXT_AREA][1].pixel_width += extra;
18337 }
18338 }
18260 18339
18261 while (from >= end && to >= toend) 18340 while (from >= end && to >= toend)
18262 *to-- = *from--; 18341 *to-- = *from--;
18263 while (to >= toend && CHAR_GLYPH_PADDING_P (*to)) 18342 if (!FRAME_WINDOW_P (it->f))
18264 { 18343 {
18265 from = 18344 while (to >= toend && CHAR_GLYPH_PADDING_P (*to))
18266 truncate_it.glyph_row->glyphs[TEXT_AREA] 18345 {
18267 + truncate_it.glyph_row->used[TEXT_AREA] - 1; 18346 from =
18268 while (from >= end && to >= toend) 18347 truncate_it.glyph_row->glyphs[TEXT_AREA]
18269 *to-- = *from--; 18348 + truncate_it.glyph_row->used[TEXT_AREA] - 1;
18349 while (from >= end && to >= toend)
18350 *to-- = *from--;
18351 }
18270 } 18352 }
18271 if (from >= end) 18353 if (from >= end)
18272 { 18354 {
@@ -19392,13 +19474,19 @@ display_line (struct it *it)
19392 new_x > it->last_visible_x 19474 new_x > it->last_visible_x
19393 /* Or it fits exactly on a window system frame. */ 19475 /* Or it fits exactly on a window system frame. */
19394 || (new_x == it->last_visible_x 19476 || (new_x == it->last_visible_x
19395 && FRAME_WINDOW_P (it->f)))) 19477 && FRAME_WINDOW_P (it->f)
19478 && (row->reversed_p
19479 ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
19480 : WINDOW_RIGHT_FRINGE_WIDTH (it->w)))))
19396 { 19481 {
19397 /* End of a continued line. */ 19482 /* End of a continued line. */
19398 19483
19399 if (it->hpos == 0 19484 if (it->hpos == 0
19400 || (new_x == it->last_visible_x 19485 || (new_x == it->last_visible_x
19401 && FRAME_WINDOW_P (it->f))) 19486 && FRAME_WINDOW_P (it->f)
19487 && (row->reversed_p
19488 ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
19489 : WINDOW_RIGHT_FRINGE_WIDTH (it->w))))
19402 { 19490 {
19403 /* Current glyph is the only one on the line or 19491 /* Current glyph is the only one on the line or
19404 fits exactly on the line. We must continue 19492 fits exactly on the line. We must continue
@@ -19509,6 +19597,10 @@ display_line (struct it *it)
19509 window system frames. We leave the glyph in 19597 window system frames. We leave the glyph in
19510 this row and let it fill the row, but don't 19598 this row and let it fill the row, but don't
19511 consume the TAB. */ 19599 consume the TAB. */
19600 if ((row->reversed_p
19601 ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
19602 : WINDOW_RIGHT_FRINGE_WIDTH (it->w)) == 0)
19603 produce_special_glyphs (it, IT_CONTINUATION);
19512 it->continuation_lines_width += it->last_visible_x; 19604 it->continuation_lines_width += it->last_visible_x;
19513 row->ends_in_middle_of_char_p = 1; 19605 row->ends_in_middle_of_char_p = 1;
19514 row->continued_p = 1; 19606 row->continued_p = 1;
@@ -19526,7 +19618,10 @@ display_line (struct it *it)
19526 row->used[TEXT_AREA] = n_glyphs_before + i; 19618 row->used[TEXT_AREA] = n_glyphs_before + i;
19527 19619
19528 /* Display continuation glyphs. */ 19620 /* Display continuation glyphs. */
19529 if (!FRAME_WINDOW_P (it->f)) 19621 if (!FRAME_WINDOW_P (it->f)
19622 || (row->reversed_p
19623 ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
19624 : WINDOW_RIGHT_FRINGE_WIDTH (it->w)) == 0)
19530 produce_special_glyphs (it, IT_CONTINUATION); 19625 produce_special_glyphs (it, IT_CONTINUATION);
19531 row->continued_p = 1; 19626 row->continued_p = 1;
19532 19627
@@ -19633,12 +19728,15 @@ display_line (struct it *it)
19633 /* If we truncate lines, we are done when the last displayed 19728 /* If we truncate lines, we are done when the last displayed
19634 glyphs reach past the right margin of the window. */ 19729 glyphs reach past the right margin of the window. */
19635 if (it->line_wrap == TRUNCATE 19730 if (it->line_wrap == TRUNCATE
19636 && (FRAME_WINDOW_P (it->f) 19731 && (FRAME_WINDOW_P (it->f) && WINDOW_RIGHT_FRINGE_WIDTH (it->w)
19637 ? (it->current_x >= it->last_visible_x) 19732 ? (it->current_x >= it->last_visible_x)
19638 : (it->current_x > it->last_visible_x))) 19733 : (it->current_x > it->last_visible_x)))
19639 { 19734 {
19640 /* Maybe add truncation glyphs. */ 19735 /* Maybe add truncation glyphs. */
19641 if (!FRAME_WINDOW_P (it->f)) 19736 if (!FRAME_WINDOW_P (it->f)
19737 || (row->reversed_p
19738 ? WINDOW_LEFT_FRINGE_WIDTH (it->w)
19739 : WINDOW_RIGHT_FRINGE_WIDTH (it->w)) == 0)
19642 { 19740 {
19643 int i, n; 19741 int i, n;
19644 19742
@@ -19663,9 +19761,36 @@ display_line (struct it *it)
19663 i = row->used[TEXT_AREA] - (i + 1); 19761 i = row->used[TEXT_AREA] - (i + 1);
19664 } 19762 }
19665 19763
19666 for (n = row->used[TEXT_AREA]; i < n; ++i) 19764 it->current_x = x_before;
19765 if (!FRAME_WINDOW_P (it->f))
19766 {
19767 for (n = row->used[TEXT_AREA]; i < n; ++i)
19768 {
19769 row->used[TEXT_AREA] = i;
19770 produce_special_glyphs (it, IT_TRUNCATION);
19771 }
19772 }
19773 else
19667 { 19774 {
19775 int stretch_width = it->last_visible_x - it->current_x;
19776
19668 row->used[TEXT_AREA] = i; 19777 row->used[TEXT_AREA] = i;
19778 if (stretch_width > 0)
19779 {
19780 struct face *face = FACE_FROM_ID (it->f, it->face_id);
19781 struct font *font =
19782 face->font ? face->font : FRAME_FONT (it->f);
19783 int stretch_ascent =
19784 (((it->ascent + it->descent)
19785 * FONT_BASE (font)) / FONT_HEIGHT (font));
19786 struct text_pos saved_pos = it->position;
19787
19788 memset (&it->position, 0, sizeof it->position);
19789 append_stretch_glyph (it, make_number (0), stretch_width,
19790 it->ascent + it->descent,
19791 stretch_ascent);
19792 it->position = saved_pos;
19793 }
19669 produce_special_glyphs (it, IT_TRUNCATION); 19794 produce_special_glyphs (it, IT_TRUNCATION);
19670 } 19795 }
19671 } 19796 }
@@ -19684,6 +19809,7 @@ display_line (struct it *it)
19684 row->exact_window_width_line_p = 1; 19809 row->exact_window_width_line_p = 1;
19685 goto at_end_of_line; 19810 goto at_end_of_line;
19686 } 19811 }
19812 it->current_x = x_before;
19687 } 19813 }
19688 19814
19689 row->truncated_on_right_p = 1; 19815 row->truncated_on_right_p = 1;
@@ -19691,7 +19817,6 @@ display_line (struct it *it)
19691 reseat_at_next_visible_line_start (it, 0); 19817 reseat_at_next_visible_line_start (it, 0);
19692 row->ends_at_zv_p = FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n'; 19818 row->ends_at_zv_p = FETCH_BYTE (IT_BYTEPOS (*it) - 1) != '\n';
19693 it->hpos = hpos_before; 19819 it->hpos = hpos_before;
19694 it->current_x = x_before;
19695 break; 19820 break;
19696 } 19821 }
19697 } 19822 }
@@ -19704,7 +19829,10 @@ display_line (struct it *it)
19704 if (it->first_visible_x 19829 if (it->first_visible_x
19705 && IT_CHARPOS (*it) != CHARPOS (row->start.pos)) 19830 && IT_CHARPOS (*it) != CHARPOS (row->start.pos))
19706 { 19831 {
19707 if (!FRAME_WINDOW_P (it->f)) 19832 if (!FRAME_WINDOW_P (it->f)
19833 || (row->reversed_p
19834 ? WINDOW_RIGHT_FRINGE_WIDTH (it->w)
19835 : WINDOW_LEFT_FRINGE_WIDTH (it->w)) == 0)
19708 insert_left_trunc_glyphs (it); 19836 insert_left_trunc_glyphs (it);
19709 row->truncated_on_left_p = 1; 19837 row->truncated_on_left_p = 1;
19710 } 19838 }
@@ -21913,7 +22041,10 @@ display_string (const char *string, Lisp_Object lisp_string, Lisp_Object face_st
21913 if (it->first_visible_x 22041 if (it->first_visible_x
21914 && it_charpos > 0) 22042 && it_charpos > 0)
21915 { 22043 {
21916 if (!FRAME_WINDOW_P (it->f)) 22044 if (!FRAME_WINDOW_P (it->f)
22045 || (row->reversed_p
22046 ? WINDOW_RIGHT_FRINGE_WIDTH (it->w)
22047 : WINDOW_LEFT_FRINGE_WIDTH (it->w)) == 0)
21917 insert_left_trunc_glyphs (it); 22048 insert_left_trunc_glyphs (it);
21918 row->truncated_on_left_p = 1; 22049 row->truncated_on_left_p = 1;
21919 } 22050 }