[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-bidi] branch emacs-bidi is created

From: Kenichi Handa
Subject: [emacs-bidi] branch emacs-bidi is created
Date: Thu, 4 Mar 2004 09:07:22 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

I've just made a branch "emacs-bidi" and commited several
changes including Eli's bidi code so that people other than
I can start working on it.

But, although I can compile the code and start up Emacs,
when I set the buffer local variable enable-bidi-display,
Emacs crashes.   Eli, I need your help.

In the reseat_1 (in xdisp.c), I put this code.

  if (it->bidi_p)
      bidi_init_it (pos.charpos, L2R, &it->bidi_it);
      bidi_get_next_char_visually (&it->bidi_it);

      pos.charpos = it->bidi_it.charpos;
      pos.bytepos = it->bidi_it.bytepos;
      it->current.pos = it->position = pos;

But, as bidi_init_it doesn't set bidi_it->ch_len,
bidi_get_next_char_visually sets it->bidi_it.bytepos to less
than it->bidi_it.charpos.

bidi_init_it has this code:

bidi_init_it (int pos, bidi_dir_t dir, struct bidi_it *bidi_it)
  if (! bidi_initialized)
    bidi_initialize ();
  bidi_set_paragraph_end (bidi_it);
  bidi_it->charpos = pos;
  if (pos <= 0)
      bidi_it->bytepos = bidi_it->charpos;
      bidi_it->ch_len = 1;      /* so that incrementing bytepos works */
    bidi_it->bytepos = CHAR_TO_BYTE (pos);

As POS is always greater than 0 when we are scanning a
buffer, bidi_it->ch_len is not set.

Ken'ichi HANDA

reply via email to

[Prev in Thread] Current Thread [Next in Thread]