From 2a95eced249db34f681bd139e4bc434281242c63 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 30 Nov 2006 20:58:59 +0000 Subject: [PATCH] (move_it_to): Correctly count tab glyphs for continued lines ending in tab. --- src/xdisp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index 909ec688aff..0a2b58761d8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -6828,7 +6828,12 @@ move_it_to (it, to_charpos, to_x, to_y, to_vpos, op) break; case MOVE_LINE_CONTINUED: - it->continuation_lines_width += it->current_x; + /* For continued lines ending in a tab, some of the glyphs + associated with the tab are displayed on the current + line. Since it->current_x does not include these glyphs, + we use it->last_visible_x instead. */ + it->continuation_lines_width += + (it->c == '\t') ? it->last_visible_x : it->current_x; break; default: -- 2.39.2