Loading ...
Sorry, an error occurred while loading the content.

635Re: clear_next don't work correctly.

Expand Messages
  • Bram Moolenaar
    Apr 22, 2002
    • 0 Attachment
      Yasuhiro Matsumoto wrote:

      > >That's not what I was asking. Where you say "mbyte_cells become 2", I
      > >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
      > >about.
      >
      > And your said is true.
      > I'm explaining again, sorry.
      >
      > For example, putting ' ' on '[][]'.
      >
      > [][] : mbyte_cell=2, (*mb_off2cell)(off)=2, (*mb_off2cell)(off+1)=2,
      > thus clear_next_cell become TRUE.
      > ... ptr will be set " ".
      > v
      > ][] : mbyte_cells=1, (*mb_off2cell)(off)=2
      > thus clear_next_cell become TRUE.
      > ... ptr will be set " ".
      > v
      > [] : repeat ....
      > v
      > ] : repeat ....
      >
      > We can't judge the character is whether it is a leadbyte or trailbyte
      > correctly.
      > Thus what we can do is to stop the repeat.
      >
      > I guess that the patch should be included.

      Well, I can predict that if we fix it this way, the problem with
      mb_off2cell() will pop up later anyway. Since the utf-8 version of this
      function returns 1 when used on the right halve of a double-wide
      character, I think the dbcs version should do the same.

      I know this is a bit of work to get right, but I think it's worth it.

      --
      Error:015 - Unable to exit Windows. Try the door.

      /// 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 ///
    • Show all 10 messages in this topic