Commit 93352106 authored by Eli Zaretskii's avatar Eli Zaretskii

Fix display of bar cursor on right-to-left text.

 xterm.c (x_draw_bar_cursor):
 w32term.c (x_draw_bar_cursor): If the character under cursor is
 R2L, draw the bar cursor on its right rather than on its left.
parent b5ba2d6f
2010-08-18 Eli Zaretskii <eliz@gnu.org>
* xterm.c (x_draw_bar_cursor):
* w32term.c (x_draw_bar_cursor): If the character under cursor is
R2L, draw the bar cursor on its right rather than on its left.
2010-08-18 Stefan Monnier <monnier@iro.umontreal.ca>
* eval.c (Fdefmacro): Only obey one declaration.
......
......@@ -4897,6 +4897,11 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row,
w->phys_cursor_width = width;
/* If the character under cursor is R2L, draw the bar cursor
on the right of its glyph, rather than on the left. */
if ((cursor_glyph->resolved_level & 1) != 0)
x += cursor_glyph->pixel_width - width;
w32_fill_area (f, hdc, cursor_color, x,
WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y),
width, row->height);
......
......@@ -7158,6 +7158,11 @@ x_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text
w->phys_cursor_width = width;
/* If the character under cursor is R2L, draw the bar cursor
on the right of its glyph, rather than on the left. */
if ((cursor_glyph->resolved_level & 1) != 0)
x += cursor_glyph->pixel_width - width;
XFillRectangle (dpy, window, gc,
WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x),
WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment