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

Patch 6.2f.036

Expand Messages
  • Bram Moolenaar
    Patch 6.2f.036 Problem: Moving leftwards over text with an illegal UTF-8 byte moves one byte instead of one character. Solution: Ignore an illegal byte
    Message 1 of 1 , May 31, 2003
    • 0 Attachment
      Patch 6.2f.036
      Problem: Moving leftwards over text with an illegal UTF-8 byte moves one
      byte instead of one character.
      Solution: Ignore an illegal byte after the cursor position.
      Files: src/mbyte.c


      *** ../vim-6.2f.035/src/mbyte.c Fri May 30 21:18:58 2003
      --- src/mbyte.c Sat May 31 18:12:56 2003
      ***************
      *** 2242,2249 ****
      /* Move q to the first byte of this char. */
      while (q > base && (*q & 0xc0) == 0x80)
      --q;
      ! /* Check for illegal sequence. */
      ! if (utf8len_tab[*q] != (int)(s - q + 1))
      return 0;

      if (q <= base)
      --- 2242,2251 ----
      /* Move q to the first byte of this char. */
      while (q > base && (*q & 0xc0) == 0x80)
      --q;
      ! /* Check for illegal sequence. Do allow an illegal byte after where we
      ! * started. */
      ! if (utf8len_tab[*q] != (int)(s - q + 1)
      ! && utf8len_tab[*q] != (int)(p - q + 1))
      return 0;

      if (q <= base)
      *** ../vim-6.2f.035/src/version.c Sat May 31 16:45:27 2003
      --- src/version.c Sat May 31 18:10:01 2003
      ***************
      *** 632,633 ****
      --- 632,635 ----
      { /* Add new patch number below this line */
      + /**/
      + 36,
      /**/

      --
      Everyone has a photographic memory. Some don't have film.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.