aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2009-07-21 20:12:09 +0000
committerChong Yidong2009-07-21 20:12:09 +0000
commite6583e3d76a55dac04206a9296a80cb837ec709e (patch)
tree459713a61024e3b96fd007348909ffb7c9a60bb4 /src
parentec06459cb6f90d7d8cf05d48cb66ac4cd0d85aad (diff)
downloademacs-e6583e3d76a55dac04206a9296a80cb837ec709e.tar.gz
emacs-e6583e3d76a55dac04206a9296a80cb837ec709e.zip
* xdisp.c (move_it_to): For continued lines ending in a tab, take
the overflowed pixels into account (Bug#3879).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c13
2 files changed, 14 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5f4c417f058..b3410b1c69e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12009-07-21 Chong Yidong <cyd@stupidchicken.com>
2
3 * xdisp.c (move_it_to): For continued lines ending in a tab, take
4 the overflowed pixels into account (Bug#3879).
5
12009-07-21 Ken Raeburn <raeburn@raeburn.org> 62009-07-21 Ken Raeburn <raeburn@raeburn.org>
2 7
3 * lread.c (load_depth): New variable. 8 * lread.c (load_depth): New variable.
diff --git a/src/xdisp.c b/src/xdisp.c
index a0ac755ffa6..33cd722e6b4 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -7090,8 +7090,7 @@ move_it_to (it, to_charpos, to_x, to_y, to_vpos, op)
7090 int op; 7090 int op;
7091{ 7091{
7092 enum move_it_result skip, skip2 = MOVE_X_REACHED; 7092 enum move_it_result skip, skip2 = MOVE_X_REACHED;
7093 int line_height; 7093 int line_height, line_start_x = 0, reached = 0;
7094 int reached = 0;
7095 7094
7096 for (;;) 7095 for (;;)
7097 { 7096 {
@@ -7274,7 +7273,11 @@ move_it_to (it, to_charpos, to_x, to_y, to_vpos, op)
7274 if (it->current_x != it->last_visible_x 7273 if (it->current_x != it->last_visible_x
7275 && (op & MOVE_TO_VPOS) 7274 && (op & MOVE_TO_VPOS)
7276 && !(op & (MOVE_TO_X | MOVE_TO_POS))) 7275 && !(op & (MOVE_TO_X | MOVE_TO_POS)))
7277 set_iterator_to_next (it, 0); 7276 {
7277 line_start_x = it->current_x + it->pixel_width
7278 - it->last_visible_x;
7279 set_iterator_to_next (it, 0);
7280 }
7278 } 7281 }
7279 else 7282 else
7280 it->continuation_lines_width += it->current_x; 7283 it->continuation_lines_width += it->current_x;
@@ -7286,7 +7289,9 @@ move_it_to (it, to_charpos, to_x, to_y, to_vpos, op)
7286 7289
7287 /* Reset/increment for the next run. */ 7290 /* Reset/increment for the next run. */
7288 recenter_overlay_lists (current_buffer, IT_CHARPOS (*it)); 7291 recenter_overlay_lists (current_buffer, IT_CHARPOS (*it));
7289 it->current_x = it->hpos = 0; 7292 it->current_x = line_start_x;
7293 line_start_x = 0;
7294 it->hpos = 0;
7290 it->current_y += it->max_ascent + it->max_descent; 7295 it->current_y += it->max_ascent + it->max_descent;
7291 ++it->vpos; 7296 ++it->vpos;
7292 last_height = it->max_ascent + it->max_descent; 7297 last_height = it->max_ascent + it->max_descent;