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

Re: "breakat" non-English chars when set linebreak and wrap

Expand Messages
  • Camillo Särs
    Hi Bram, ... Do you keep the unicode charater properties in memory somewhere? In that case you might want to consider doing a lookup in that table instead.
    Message 1 of 4 , Aug 29, 2005
    • 0 Attachment
      Hi Bram,

      Bram Moolenaar wrote:
      > Anyway, using a regexp here will certainly slow down processing.
      > Currently a 256-entry lookup table is used to speedup processing. That
      > won't work for multi-byte characters...

      Do you keep the unicode charater properties in memory somewhere? In
      that case you might want to consider doing a lookup in that table
      instead. Actually, I believe that that's the only "right" solution that
      would work reasonably correctly under any language.

      Regards,
      Camillo
      --
      Camillo Särs <ged@...> Aim for the impossible and you
      http://camillo.särs.net will achieve the improbable
    • Bram Moolenaar
      ... There are a few properties of Unicode characters that Vim knows, such as the cell width and upper/lower case. But that a sequence of characters can be
      Message 2 of 4 , Aug 29, 2005
      • 0 Attachment
        Camillo Särs wrote:

        > Bram Moolenaar wrote:
        > > Anyway, using a regexp here will certainly slow down processing.
        > > Currently a 256-entry lookup table is used to speedup processing. That
        > > won't work for multi-byte characters...
        >
        > Do you keep the unicode charater properties in memory somewhere? In
        > that case you might want to consider doing a lookup in that table
        > instead. Actually, I believe that that's the only "right" solution that
        > would work reasonably correctly under any language.

        There are a few properties of Unicode characters that Vim knows, such as
        the cell width and upper/lower case. But that a sequence of characters
        can be wrapped at any point isn't in there. The rough separation in
        latin1 and non-latin1 characters is sufficient for when mixing Asian
        text with English. Perhaps that's sufficient for most people.

        --
        hundred-and-one symptoms of being an internet addict:
        120. You ask a friend, "What's that big shiny thing?" He says, "It's the sun."

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
        \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
      Your message has been successfully submitted and would be delivered to recipients shortly.