changeset 74339:7fdb8f743bf5

(move_it_to): Correctly count tab glyphs for continued lines ending in tab.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 30 Nov 2006 20:58:59 +0000
parents 71dce30419e5
children ba613bb7aa38
files src/xdisp.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Thu Nov 30 20:58:46 2006 +0000
+++ b/src/xdisp.c	Thu Nov 30 20:58:59 2006 +0000
@@ -6828,7 +6828,12 @@
 	  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: