aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.c
diff options
context:
space:
mode:
authorStefan Monnier2014-09-22 15:20:45 -0400
committerStefan Monnier2014-09-22 15:20:45 -0400
commit9949231fb06aa4a2dfa536e9d5125a81424db3a7 (patch)
treea2259e8489127b8685097a20a3fd3d7be222d9fe /src/w32term.c
parent298dfce8ac018aca6f8f1a38d7199cc28bfaf7fd (diff)
parentfc5ebc3f497a152132407d57a14cce147d59d29c (diff)
downloademacs-9949231fb06aa4a2dfa536e9d5125a81424db3a7.tar.gz
emacs-9949231fb06aa4a2dfa536e9d5125a81424db3a7.zip
Merge from emacs-24
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 55c2d718346..443f5ece8f0 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -2228,7 +2228,7 @@ x_draw_stretch_glyph_string (struct glyph_string *s)
2228 { 2228 {
2229 /* In R2L rows, draw the cursor on the right edge of the 2229 /* In R2L rows, draw the cursor on the right edge of the
2230 stretch glyph. */ 2230 stretch glyph. */
2231 int right_x = window_box_right_offset (s->w, TEXT_AREA); 2231 int right_x = window_box_right (s->w, TEXT_AREA);
2232 2232
2233 if (x + background_width > right_x) 2233 if (x + background_width > right_x)
2234 background_width -= x - right_x; 2234 background_width -= x - right_x;
@@ -5472,6 +5472,12 @@ x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
5472 /* Compute frame-relative coordinates for phys cursor. */ 5472 /* Compute frame-relative coordinates for phys cursor. */
5473 get_phys_cursor_geometry (w, row, cursor_glyph, &left, &top, &h); 5473 get_phys_cursor_geometry (w, row, cursor_glyph, &left, &top, &h);
5474 rect.left = left; 5474 rect.left = left;
5475 /* When on R2L character, show cursor at the right edge of the
5476 glyph, unless the cursor box is as wide as the glyph or wider
5477 (the latter happens when x-stretch-cursor is non-nil). */
5478 if ((cursor_glyph->resolved_level & 1) != 0
5479 && cursor_glyph->pixel_width > w->phys_cursor_width)
5480 rect.left += cursor_glyph->pixel_width - w->phys_cursor_width;
5475 rect.top = top; 5481 rect.top = top;
5476 rect.bottom = rect.top + h; 5482 rect.bottom = rect.top + h;
5477 rect.right = rect.left + w->phys_cursor_width; 5483 rect.right = rect.left + w->phys_cursor_width;
@@ -5553,7 +5559,7 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row,
5553 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), 5559 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y),
5554 width, row->height); 5560 width, row->height);
5555 } 5561 }
5556 else 5562 else /* HBAR_CURSOR */
5557 { 5563 {
5558 int dummy_x, dummy_y, dummy_h; 5564 int dummy_x, dummy_y, dummy_h;
5559 5565
@@ -5564,6 +5570,9 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row,
5564 5570
5565 get_phys_cursor_geometry (w, row, cursor_glyph, &dummy_x, 5571 get_phys_cursor_geometry (w, row, cursor_glyph, &dummy_x,
5566 &dummy_y, &dummy_h); 5572 &dummy_y, &dummy_h);
5573 if ((cursor_glyph->resolved_level & 1) != 0
5574 && cursor_glyph->pixel_width > w->phys_cursor_width)
5575 x += cursor_glyph->pixel_width - w->phys_cursor_width;
5567 w32_fill_area (f, hdc, cursor_color, x, 5576 w32_fill_area (f, hdc, cursor_color, x,
5568 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y + 5577 WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y +
5569 row->height - width), 5578 row->height - width),