all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Kenichi Handa  <handa@m17n.org>
Cc: 3452@emacsbugs.donarmstrong.com
Subject: bug#3452: 23.0.94; display
Date: Sat, 06 Jun 2009 23:47:26 -0400	[thread overview]
Message-ID: <877hzoogc1.fsf@cyd.mit.edu> (raw)

> The problem stems from the character 8237 (#o20055, #x202d),
> LEFT-TO-RIGHT OVERRIDE.  For some reason, the composition for this
> character screws up line wrapping.

Hi Handa-san, I investigated some more.  Let me know what you think.

The entry for 8237 (#x202d) in char-width-table is 0: that is to say,
char-width-table reports that the composition has zero width.  This is
because of the following code in characters.el:

  (let ((l '((#x0300 . #x036F)
            ...
            (#x202A . #x202E)
            (#xE0001 . #xE01EF))))
    (dolist (elt l)
      (set-char-table-range char-width-table elt 0)))

The function fill_gstring_body in composite.c uses char-width-table.
However, composition_gstring_width for this character, called in
term.c:1830, returns 1.  This inconsistency leads to the bug.

Sure enough, if I do

  (aset char-width-table #x202d 1)

then the screen corruption goes away.

Maybe we should reconsider setting these characters to have zero-width
for char-width-table in characters.el, since fill-gstring-body seems to
handle zero-width compositions poorly.  WDYT?





             reply	other threads:[~2009-06-07  3:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-07  3:47 Chong Yidong [this message]
2009-06-07  9:16 ` bug#3452: 23.0.94; display Eli Zaretskii
2009-06-07 13:56   ` Chong Yidong
2009-06-07 14:30     ` Eli Zaretskii
2009-06-07 20:41   ` Chong Yidong
2009-06-07 22:53     ` Eli Zaretskii
2009-06-08  1:51 ` Kenichi Handa
2009-06-08  4:48   ` Eli Zaretskii
2009-06-08  8:10     ` Kenichi Handa
2009-06-08  8:44       ` Eli Zaretskii
2009-06-08 11:57         ` Kenichi Handa
2009-06-08 14:47           ` Chong Yidong
2009-06-09 18:00           ` Chong Yidong
2009-06-10  0:35             ` Kenichi Handa
  -- strict thread matches above, loose matches on Subject: below --
2009-06-06  2:48 Chong Yidong
2009-06-03  2:53 Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hzoogc1.fsf@cyd.mit.edu \
    --to=cyd@stupidchicken.com \
    --cc=3452@emacsbugs.donarmstrong.com \
    --cc=handa@m17n.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.