From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sven Joachim Newsgroups: gmane.emacs.devel Subject: Re: /srv/bzr/emacs/trunk r101129: Fix display of bar cursor on right-to-left text. Date: Wed, 18 Aug 2010 19:47:59 +0200 Message-ID: <87hbirizhs.fsf@turtle.gmx.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1282153696 6485 80.91.229.12 (18 Aug 2010 17:48:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Aug 2010 17:48:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 18 19:48:13 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OlmkG-0002Ih-PF for ged-emacs-devel@m.gmane.org; Wed, 18 Aug 2010 19:48:13 +0200 Original-Received: from localhost ([127.0.0.1]:57375 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OlmkG-0006Ry-8F for ged-emacs-devel@m.gmane.org; Wed, 18 Aug 2010 13:48:12 -0400 Original-Received: from [140.186.70.92] (port=40191 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OlmkA-0006Ro-KN for emacs-devel@gnu.org; Wed, 18 Aug 2010 13:48:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Olmk7-000829-ED for emacs-devel@gnu.org; Wed, 18 Aug 2010 13:48:06 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:56078 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Olmk7-00081q-0f for emacs-devel@gnu.org; Wed, 18 Aug 2010 13:48:03 -0400 Original-Received: (qmail invoked by alias); 18 Aug 2010 17:48:01 -0000 Original-Received: from p54861F06.dip.t-dialin.net (EHLO turtle.gmx.de) [84.134.31.6] by mail.gmx.net (mp061) with SMTP; 18 Aug 2010 19:48:01 +0200 X-Authenticated: #28250155 X-Provags-ID: V01U2FsdGVkX1+rLm9XpAOrpiDC7wJq0DG/iUMwH8aUmOjpmuyiuL Pmthne0Nof56Rc Original-Received: by turtle.gmx.de (Postfix, from userid 1000) id 89D0D3F295; Wed, 18 Aug 2010 19:47:59 +0200 (CEST) In-Reply-To: (Eli Zaretskii's message of "Wed, 18 Aug 2010 19:42:06 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:128848 Archived-At: On 2010-08-18 18:42 +0200, Eli Zaretskii wrote: > ------------------------------------------------------------ > revno: 101129 > committer: Eli Zaretskii > 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 > + > + * 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 > > * 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