diff options
author | Kim F. Storm <[email protected]> | 2004-09-07 20:53:43 +0000 |
---|---|---|
committer | Kim F. Storm <[email protected]> | 2004-09-07 20:53:43 +0000 |
commit | a01c5155e8e8672681abe1383f739043deaecdd1 (patch) | |
tree | 548a2c2634fa520d8ea529df8d6038f150fbf4c0 | |
parent | 8041ea759c1d5d1a4ee1a1b0d62fe10d7b7b04a9 (diff) |
(set_cursor_from_row): Fix last change. Only use 'cursor'
property from text property or overlay strings at point.
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | src/xdisp.c | 15 |
2 files changed, 20 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 044f72d6b2..c8da0ca418 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-09-07 Kim F. Storm <[email protected]> + + * term.el (term-window-width): Only use full window width on + window system if overflow-newline-into-fringe is enabled. + (term-mode): Don't disable overflow-newline-into-fringe. + 2004-09-07 Stefan <[email protected]> * newcomment.el (uncomment-region-default, comment-region-default): diff --git a/src/xdisp.c b/src/xdisp.c index 409d32449e..4de7166589 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) int string_before_pos; int x = row->x; int cursor_x = x; + int cursor_from_overlay_pos = 0; int pt_old = PT - delta; /* 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) string_start = NULL; x += glyph->pixel_width; ++glyph; + if (cursor_from_overlay_pos + && last_pos > cursor_from_overlay_pos) + { + cursor_from_overlay_pos = 0; + cursor = 0; + } } else { @@ -10693,10 +10700,16 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos) /* Skip all glyphs from string. */ do { + int pos; if ((cursor == NULL || glyph > cursor) && !NILP (Fget_char_property (make_number ((glyph)->charpos), - Qcursor, (glyph)->object))) + Qcursor, (glyph)->object)) + && (pos = string_buffer_position (w, glyph->object, + string_before_pos), + (pos == 0 /* From overlay */ + || pos == pt_old))) { + cursor_from_overlay_pos = pos == 0 ? last_pos : 0; cursor = glyph; cursor_x = x; } |