aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/xdisp.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index c6ae6ad4c14..997c76934d4 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12606,7 +12606,8 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
12606 } 12606 }
12607 if (INTEGERP (glyph->object) && glyph->charpos < 0) 12607 if (INTEGERP (glyph->object) && glyph->charpos < 0)
12608 --glyph; 12608 --glyph;
12609 /* By default, put the cursor on the rightmost glyph. */ 12609 /* By default, in reversed rows we put the cursor on the
12610 rightmost (first in the reading order) glyph. */
12610 for (g = end + 1; g < glyph; g++) 12611 for (g = end + 1; g < glyph; g++)
12611 x += g->pixel_width; 12612 x += g->pixel_width;
12612 cursor_x = x; 12613 cursor_x = x;
@@ -12683,7 +12684,16 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
12683 bpos_covered = bpos_max + XINT (chprop); 12684 bpos_covered = bpos_max + XINT (chprop);
12684 /* If the `cursor' property covers buffer positions up 12685 /* If the `cursor' property covers buffer positions up
12685 to and including point, we should display cursor on 12686 to and including point, we should display cursor on
12686 this glyph. */ 12687 this glyph. Note that overlays and text properties
12688 with string values stop bidi reordering, so every
12689 buffer position to the left of the string is always
12690 smaller than any position to the right of the
12691 string. Therefore, if a `cursor' property on one
12692 of the string's characters has an integer value, we
12693 will break out of the loop below _before_ we get to
12694 the position match above. IOW, integer values of
12695 the `cursor' property override the "exact match for
12696 point" strategy of positioning the cursor. */
12687 /* Implementation note: bpos_max == pt_old when, e.g., 12697 /* Implementation note: bpos_max == pt_old when, e.g.,
12688 we are in an empty line, where bpos_max is set to 12698 we are in an empty line, where bpos_max is set to
12689 MATRIX_ROW_START_CHARPOS, see above. */ 12699 MATRIX_ROW_START_CHARPOS, see above. */