From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yu-ji Hosokawa Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#3005: 23.0.92; w32term.c: width of hbar cursor on a wide character Date: Fri, 17 Apr 2009 07:02:28 +0900 Message-ID: <20090417.070228.257389230.orz@aspirin.yamato.hoso.net> References: <20090416.090240.05089609.orz@aspirin.yamato.hoso.net> <008c01c9bea6$e25e01b0$c2b22382@us.oracle.com> Reply-To: Yu-ji Hosokawa , 3005@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1239920653 3429 80.91.229.12 (16 Apr 2009 22:24:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Apr 2009 22:24:13 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, 3005@emacsbugs.donarmstrong.com To: drew.adams@oracle.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Apr 17 00:25:32 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lua1S-0004Dw-2h for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Apr 2009 00:25:30 +0200 Original-Received: from localhost ([127.0.0.1]:59505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lua03-0006Dl-7I for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Apr 2009 18:24:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LuZzz-0006DB-1E for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2009 18:23:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LuZzu-00069Y-D5 for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2009 18:23:58 -0400 Original-Received: from [199.232.76.173] (port=57800 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LuZzu-00069Q-3n for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2009 18:23:54 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:56801) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LuZzt-0000e0-H9 for bug-gnu-emacs@gnu.org; Thu, 16 Apr 2009 18:23:53 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3GMNpj3028165; Thu, 16 Apr 2009 15:23:51 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n3GMA5fa024720; Thu, 16 Apr 2009 15:10:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Yu-ji Hosokawa Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 16 Apr 2009 22:10:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3005 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3005-submit@emacsbugs.donarmstrong.com id=B3005.123991936122425 (code B ref 3005); Thu, 16 Apr 2009 22:10:05 +0000 Original-Received: (at 3005) by emacsbugs.donarmstrong.com; 16 Apr 2009 22:02:41 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.186]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n3GM2W83022417 for <3005@emacsbugs.donarmstrong.com>; Thu, 16 Apr 2009 15:02:34 -0700 Original-Received: by ti-out-0910.google.com with SMTP id d27so401811tid.1 for <3005@emacsbugs.donarmstrong.com>; Thu, 16 Apr 2009 15:02:32 -0700 (PDT) Original-Received: by 10.110.11.4 with SMTP id 4mr2028034tik.14.1239919352043; Thu, 16 Apr 2009 15:02:32 -0700 (PDT) Original-Received: from localhost (ff-149-73.edit.ne.jp [218.219.149.73]) by mx.google.com with ESMTPS id 25sm2446510tif.12.2009.04.16.15.02.30 (version=SSLv3 cipher=RC4-MD5); Thu, 16 Apr 2009 15:02:30 -0700 (PDT) In-Reply-To: <008c01c9bea6$e25e01b0$c2b22382@us.oracle.com> X-Mailer: Mew version 6.2.51 on Emacs 23.0.92 / Mule 6.0 (HANACHIRUSATO) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Thu, 16 Apr 2009 18:23:58 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:27269 gmane.emacs.pretest.bugs:24296 Archived-At: Hello, >> From: Yu-ji Hosokawa Sent: Wednesday, April 15, 2009 5:03 PM >> The width of HBAR cursor on a wide character is narrower than the >> character width. >> On Emacs 22.3, HBAR cursor width and the underlying character width >> were the same. It is a desirable view, I think. > > See bug #1258. Thank you for the info. Again patch. How about the following? It works fine for me. but I noticed that even if it patched, still not relieve composed form character width. thanks, --yu $ cvs diff -pu src/w32term.c Index: src/w32term.c =================================================================== RCS file: /sources/emacs/emacs/src/w32term.c,v retrieving revision 1.323 diff -p -u -r1.323 w32term.c --- src/w32term.c 22 Mar 2009 02:39:30 -0000 1.323 +++ src/w32term.c 16 Apr 2009 21:38:49 -0000 @@ -4971,6 +4971,7 @@ x_draw_bar_cursor (w, row, width, kind) struct frame *f = XFRAME (w->frame); struct glyph *cursor_glyph; int x; + int hbar_width; HDC hdc; /* If cursor is out of bounds, don't draw garbage. This can happen @@ -5022,10 +5023,16 @@ x_draw_bar_cursor (w, row, width, kind) } else { + hbar_width = min (FRAME_COLUMN_WIDTH (f), cursor_glyph->pixel_width); + + /* Multibyte character can be wider than FRAME_COLUMN_WIDTH. */ + if (cursor_glyph->type == CHAR_GLYPH && cursor_glyph->u.ch >= 0x80) + hbar_width = cursor_glyph->pixel_width; + w32_fill_area (f, hdc, cursor_color, x, WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y + row->height - width), - min (FRAME_COLUMN_WIDTH (f), cursor_glyph->pixel_width), + hbar_width, width); }