632Re: clear_next don't work correctly.
- Apr 20, 2002Yasuhiro Matsumoto wrote:
> >I don't see how this can go wrong, unless the mb_off2cells() call givesThat's not what I was asking. Where you say "mbyte_cells become 2", I
> >a wrong result. I guess that might happen when it's called with an
> >offset that points to the right halve of a double-wide character. At
> >least for DBCS characters this does not appear to be checked and an
> >invalid result might be returned.
> >I think we should attempt to fix the cause of the problem and not work
> >around it. mb_off2cells() appears to be used in several places where we
> >don't know if we are looking at a single-byte character, the head byte
> >or the tail byte of a double-byte character. Can this be fixed?
> Hmm, I guess that the patch should be included.
> if leadbyte erase by single-width character,
> double-width character will be broken.
> Then, the trailbyte and leadbyte of next character might become DBCS.
> For example, putting ' ' on ''.
>  : clear_next_cell will be TRUE
> ] : set ptr = " ", but mbyte_cells become 2.
>  : thus, set ptr = " " again.
> ] : repeat ....
> : repeat ....
don't understand it. mbyte_cells is 1 when displaying the extra " ".
Do you mean mb_off2cells() returns 2? That is the problem I was talking
Emacs is a nice OS - but it lacks a good text editor.
That's why I am using Vim. --Anonymous
/// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
/// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\
\\\ Project leader for A-A-P -- http://www.a-a-p.org ///
\\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
- << Previous post in topic Next post in topic >>