* Re: /srv/bzr/emacs/trunk r101129: Fix display of bar cursor on right-to-left text.
[not found] <E1OlmGZ-0006kY-Di@internal.in.savannah.gnu.org>
@ 2010-08-18 17:47 ` Sven Joachim
2010-08-18 19:13 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Sven Joachim @ 2010-08-18 17:47 UTC (permalink / raw
To: Eli Zaretskii; +Cc: emacs-devel
On 2010-08-18 18:42 +0200, Eli Zaretskii wrote:
> ------------------------------------------------------------
> revno: 101129
> committer: Eli Zaretskii <eliz@gnu.org>
> branch nick: trunk
> timestamp: Wed 2010-08-18 19:42:06 +0300
> message:
> 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.
> modified:
> src/ChangeLog
> src/w32term.c
> src/xterm.c
> === modified file 'src/ChangeLog'
> --- a/src/ChangeLog 2010-08-18 10:21:43 +0000
> +++ b/src/ChangeLog 2010-08-18 16:42:06 +0000
> @@ -1,3 +1,9 @@
> +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.
>
> === modified file 'src/w32term.c'
> --- a/src/w32term.c 2010-08-14 12:55:04 +0000
> +++ b/src/w32term.c 2010-08-18 16:42:06 +0000
> @@ -4897,6 +4897,11 @@
>
> 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);
>
> === modified file 'src/xterm.c'
> --- a/src/xterm.c 2010-08-14 12:55:04 +0000
> +++ b/src/xterm.c 2010-08-18 16:42:06 +0000
> @@ -7158,6 +7158,11 @@
>
> 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),
This does not build:
xterm.c: In function 'x_draw_bar_cursor':
xterm.c:7164: error: 'x' undeclared (first use in this function)
xterm.c:7164: error: (Each undeclared identifier is reported only once
xterm.c:7164: error: for each function it appears in.)
make[1]: *** [xterm.o] Error 1
Sven
^ permalink raw reply [flat|nested] 3+ messages in thread