diff --git a/src/xdisp.c b/src/xdisp.c index 763af7d3bc8..46611628d06 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -9905,6 +9905,7 @@ #define IT_RESET_X_ASCENT_DESCENT(IT) \ /* More than one glyph or glyph doesn't fit on line. All glyphs have the same width. */ int single_glyph_width = it->pixel_width / it->nglyphs; + int single_glyph_halfwidth = single_glyph_width / 2; int new_x; int x_before_this_char = x; int hpos_before_this_char = it->hpos; @@ -9914,7 +9915,7 @@ #define IT_RESET_X_ASCENT_DESCENT(IT) \ new_x = x + single_glyph_width; /* We want to leave anything reaching TO_X to the caller. */ - if ((op & MOVE_TO_X) && new_x > to_x) + if ((op & MOVE_TO_X) && (x + single_glyph_halfwidth) > to_x) { if (BUFFER_POS_REACHED_P ()) {