aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c12
2 files changed, 12 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3d04357af59..0b9729d3833 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12014-08-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * xdisp.c (erase_phys_cursor): Fix confusion between window-relative
4 and text area-relative x-coordinates.
5
12014-08-17 Eli Zaretskii <eliz@gnu.org> 62014-08-17 Eli Zaretskii <eliz@gnu.org>
2 7
3 Avoid overwriting the reversed_p flags in the glyph matrices when 8 Avoid overwriting the reversed_p flags in the glyph matrices when
diff --git a/src/xdisp.c b/src/xdisp.c
index e7c3e922cb9..39e70717143 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -27370,7 +27370,7 @@ erase_phys_cursor (struct window *w)
27370 /* Maybe clear the display under the cursor. */ 27370 /* Maybe clear the display under the cursor. */
27371 if (w->phys_cursor_type == HOLLOW_BOX_CURSOR) 27371 if (w->phys_cursor_type == HOLLOW_BOX_CURSOR)
27372 { 27372 {
27373 int x, y, left_x; 27373 int x, y;
27374 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); 27374 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
27375 int width; 27375 int width;
27376 27376
@@ -27379,13 +27379,15 @@ erase_phys_cursor (struct window *w)
27379 goto mark_cursor_off; 27379 goto mark_cursor_off;
27380 27380
27381 width = cursor_glyph->pixel_width; 27381 width = cursor_glyph->pixel_width;
27382 left_x = window_box_left_offset (w, TEXT_AREA);
27383 x = w->phys_cursor.x; 27382 x = w->phys_cursor.x;
27384 if (x < left_x) 27383 if (x < 0)
27385 width -= left_x - x; 27384 {
27385 width += x;
27386 x = 0;
27387 }
27386 width = min (width, window_box_width (w, TEXT_AREA) - x); 27388 width = min (width, window_box_width (w, TEXT_AREA) - x);
27387 y = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, cursor_row->y)); 27389 y = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, cursor_row->y));
27388 x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, max (x, left_x)); 27390 x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, x);
27389 27391
27390 if (width > 0) 27392 if (width > 0)
27391 FRAME_RIF (f)->clear_frame_area (f, x, y, width, cursor_row->visible_height); 27393 FRAME_RIF (f)->clear_frame_area (f, x, y, width, cursor_row->visible_height);