aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2004-09-07 20:53:43 +0000
committerKim F. Storm2004-09-07 20:53:43 +0000
commita01c5155e8e8672681abe1383f739043deaecdd1 (patch)
tree548a2c2634fa520d8ea529df8d6038f150fbf4c0 /src
parent8041ea759c1d5d1a4ee1a1b0d62fe10d7b7b04a9 (diff)
downloademacs-a01c5155e8e8672681abe1383f739043deaecdd1.tar.gz
emacs-a01c5155e8e8672681abe1383f739043deaecdd1.zip
(set_cursor_from_row): Fix last change. Only use 'cursor'
property from text property or overlay strings at point.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 409d32449e5..4de7166589d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10659,6 +10659,7 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
10659 int string_before_pos; 10659 int string_before_pos;
10660 int x = row->x; 10660 int x = row->x;
10661 int cursor_x = x; 10661 int cursor_x = x;
10662 int cursor_from_overlay_pos = 0;
10662 int pt_old = PT - delta; 10663 int pt_old = PT - delta;
10663 10664
10664 /* Skip over glyphs not having an object at the start of the row. 10665 /* Skip over glyphs not having an object at the start of the row.
@@ -10684,6 +10685,12 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
10684 string_start = NULL; 10685 string_start = NULL;
10685 x += glyph->pixel_width; 10686 x += glyph->pixel_width;
10686 ++glyph; 10687 ++glyph;
10688 if (cursor_from_overlay_pos
10689 && last_pos > cursor_from_overlay_pos)
10690 {
10691 cursor_from_overlay_pos = 0;
10692 cursor = 0;
10693 }
10687 } 10694 }
10688 else 10695 else
10689 { 10696 {
@@ -10693,10 +10700,16 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
10693 /* Skip all glyphs from string. */ 10700 /* Skip all glyphs from string. */
10694 do 10701 do
10695 { 10702 {
10703 int pos;
10696 if ((cursor == NULL || glyph > cursor) 10704 if ((cursor == NULL || glyph > cursor)
10697 && !NILP (Fget_char_property (make_number ((glyph)->charpos), 10705 && !NILP (Fget_char_property (make_number ((glyph)->charpos),
10698 Qcursor, (glyph)->object))) 10706 Qcursor, (glyph)->object))
10707 && (pos = string_buffer_position (w, glyph->object,
10708 string_before_pos),
10709 (pos == 0 /* From overlay */
10710 || pos == pt_old)))
10699 { 10711 {
10712 cursor_from_overlay_pos = pos == 0 ? last_pos : 0;
10700 cursor = glyph; 10713 cursor = glyph;
10701 cursor_x = x; 10714 cursor_x = x;
10702 } 10715 }