summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xdisp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index f2b158f00e3..2c676c09827 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -16939,9 +16939,18 @@ overlay_arrow_at_row (struct it *it, struct glyph_row *row)
val = find_symbol_value (var);
+ ptrdiff_t arrow_marker_pos;
if (MARKERP (val)
&& current_buffer == XMARKER (val)->buffer
- && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val)))
+ && (arrow_marker_pos = marker_position (val),
+ /* Normally, the marker position will be at the row's
+ start charpos. But if the previous text lines are
+ invisible, the row's start charpos includes those
+ invisible lines, so we make a more general test that
+ the marker position is anywhere between the start and
+ the end character positions of this row. */
+ (MATRIX_ROW_START_CHARPOS (row) <= arrow_marker_pos
+ && arrow_marker_pos < MATRIX_ROW_END_CHARPOS (row))))
{
if (FRAME_WINDOW_P (it->f)
/* FIXME: if ROW->reversed_p is set, this should test