summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2006-11-30 20:58:59 +0000
committerChong Yidong <cyd@stupidchicken.com>2006-11-30 20:58:59 +0000
commit023dd5de46103d63803f825d0c850d722e8694c4 (patch)
tree058dfbc95adefe511f698a4c7b46e5a5c78e914b /src
parent73672faeb3a823eb0250e2d754a97c852ca0fb5f (diff)
downloademacs-023dd5de46103d63803f825d0c850d722e8694c4.tar.gz
(move_it_to): Correctly count tab glyphs for continued lines ending in
tab.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c7
1 files changed, 6 insertions, 1 deletions
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: