aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2011-09-17 11:09:45 +0300
committerEli Zaretskii2011-09-17 11:09:45 +0300
commitbb187662be4ccd53e168fb07501931da596de39a (patch)
tree55153805ac8727c722b30d7c640ae7ba702e9e28
parent540e44dbc817db4eb7cbe7f32162a11fa3547281 (diff)
downloademacs-bb187662be4ccd53e168fb07501931da596de39a.tar.gz
emacs-bb187662be4ccd53e168fb07501931da596de39a.zip
Fix bug #9524 with cursor positioning on display strings in truncated lines.
src/xdisp.c (set_cursor_from_row): Don't invoke special treatment of truncated lines if point is covered by a display string.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c18
2 files changed, 15 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 27b7e709317..c6238701301 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-09-17 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
4 truncated lines if point is covered by a display string. (Bug#9524)
5
12011-09-16 Paul Eggert <eggert@cs.ucla.edu> 62011-09-16 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 * xselect.c: Relax test for outgoing X longs (Bug#9498). 8 * xselect.c: Relax test for outgoing X longs (Bug#9498).
diff --git a/src/xdisp.c b/src/xdisp.c
index 6ba92f3ed79..864734d4b20 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13637,15 +13637,17 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
13637 /* A truncated row may not include PT among its 13637 /* A truncated row may not include PT among its
13638 character positions. Setting the cursor inside the 13638 character positions. Setting the cursor inside the
13639 scroll margin will trigger recalculation of hscroll 13639 scroll margin will trigger recalculation of hscroll
13640 in hscroll_window_tree. */ 13640 in hscroll_window_tree. But if a display string
13641 || (row->truncated_on_left_p && pt_old < bpos_min) 13641 covers point, defer to the string-handling code
13642 || (row->truncated_on_right_p && pt_old > bpos_max) 13642 below to figure this out. */
13643 /* Zero-width characters produce no glyphs. */
13644 || (!string_seen 13643 || (!string_seen
13645 && !empty_line_p 13644 && ((row->truncated_on_left_p && pt_old < bpos_min)
13646 && (row->reversed_p 13645 || (row->truncated_on_right_p && pt_old > bpos_max)
13647 ? glyph_after > glyphs_end 13646 /* Zero-width characters produce no glyphs. */
13648 : glyph_after < glyphs_end))) 13647 || (!empty_line_p
13648 && (row->reversed_p
13649 ? glyph_after > glyphs_end
13650 : glyph_after < glyphs_end)))))
13649 { 13651 {
13650 cursor = glyph_after; 13652 cursor = glyph_after;
13651 x = -1; 13653 x = -1;