aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2008-08-08 15:43:45 +0000
committerChong Yidong2008-08-08 15:43:45 +0000
commit97c9858753082f553e59c294fcc1d5fffa61ffa2 (patch)
treeed7a9d46c485d0729861d420cd878bb4debdbe8f /src
parent96f55ac019ad44dc237a733e6df65323c9c9ffd7 (diff)
downloademacs-97c9858753082f553e59c294fcc1d5fffa61ffa2.tar.gz
emacs-97c9858753082f553e59c294fcc1d5fffa61ffa2.zip
(move_it_to): When stopping at a charpos, check if that's a continued
multi-char glyph; if so, advance to the actual glyph.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c24
2 files changed, 30 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4544bf0b841..af871f2ce62 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12008-08-08 Chong Yidong <cyd@stupidchicken.com>
2
3 * xdisp.c (move_it_to): When stopping at a charpos, check if
4 that's a continued multi-char glyph; if so, advance to the actual
5 glyph.
6
12008-08-07 Dan Nicolaescu <dann@ics.uci.edu> 72008-08-07 Dan Nicolaescu <dann@ics.uci.edu>
2 8
3 * s/darwin.h (OTHER_FILES): Do not define here, defined in 9 * s/darwin.h (OTHER_FILES): Do not define here, defined in
diff --git a/src/xdisp.c b/src/xdisp.c
index 920e7c1d34e..2f809e3a096 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -7296,6 +7296,30 @@ move_it_to (it, to_charpos, to_x, to_y, to_vpos, op)
7296 7296
7297 out: 7297 out:
7298 7298
7299 /* On text terminals, we may stop at the end of a line in the middle
7300 of a multi-character glyph. If the glyph itself is continued,
7301 i.e. it is actually displayed on the next line, don't treat this
7302 stopping point as valid; move to the next line instead (unless
7303 that brings us offscreen). */
7304 if (!FRAME_WINDOW_P (it->f)
7305 && op & MOVE_TO_POS
7306 && IT_CHARPOS (*it) == to_charpos
7307 && it->what == IT_CHARACTER
7308 && it->nglyphs > 1
7309 && it->line_wrap == WINDOW_WRAP
7310 && it->current_x == it->last_visible_x - 1
7311 && it->c != '\n'
7312 && it->c != '\t'
7313 && it->vpos < XFASTINT (it->w->window_end_vpos))
7314 {
7315 it->continuation_lines_width += it->current_x;
7316 it->current_x = it->hpos = it->max_ascent = it->max_descent = 0;
7317 it->current_y += it->max_ascent + it->max_descent;
7318 ++it->vpos;
7319 last_height = it->max_ascent + it->max_descent;
7320 last_max_ascent = it->max_ascent;
7321 }
7322
7299 TRACE_MOVE ((stderr, "move_it_to: reached %d\n", reached)); 7323 TRACE_MOVE ((stderr, "move_it_to: reached %d\n", reached));
7300} 7324}
7301 7325