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

Patch 6.2.054

Expand Messages
  • Bram Moolenaar
    Patch 6.2.054 Problem: A double-byte character with a second byte that is a backslash causes problems inside a string. Solution: Skip over multi-byte
    Message 1 of 1 , Jul 27 6:02 AM
    • 0 Attachment
      Patch 6.2.054
      Problem: A double-byte character with a second byte that is a backslash
      causes problems inside a string.
      Solution: Skip over multi-byte characters in a string properly. (Yasuhiro
      Matsumoto)
      Files: src/eval.c


      *** ../vim-6.2.053/src/eval.c Sun Jul 27 14:26:54 2003
      --- src/eval.c Sat Jul 26 18:35:19 2003
      ***************
      *** 2468,2473 ****
      --- 2468,2474 ----
      * Find the end of the string, skipping backslashed characters.
      */
      for (p = *arg + 1; *p && *p != '"'; ++p)
      + {
      if (*p == '\\' && p[1] != NUL)
      {
      ++p;
      ***************
      *** 2476,2481 ****
      --- 2477,2488 ----
      if (*p == '<')
      extra += 2;
      }
      + #ifdef FEAT_MBYTE
      + if (has_mbyte)
      + p += (*mb_ptr2len_check)(p) - 1;
      + #endif
      + }
      +
      if (*p != '"')
      {
      EMSG2(_("E114: Missing quote: %s"), *arg);
      ***************
      *** 2581,2586 ****
      --- 2588,2604 ----
      }
      else
      name[i++] = *p;
      +
      + #ifdef FEAT_MBYTE
      + /* For a multi-byte character copy the bytes after the first one. */
      + if (has_mbyte)
      + {
      + int l = (*mb_ptr2len_check)(p);
      +
      + while (--l > 0)
      + name[i++] = *++p;
      + }
      + #endif
      }
      name[i] = NUL;
      *arg = p + 1;
      *** ../vim-6.2.053/src/version.c Sun Jul 27 14:59:28 2003
      --- src/version.c Sun Jul 27 15:00:47 2003
      ***************
      *** 632,633 ****
      --- 632,635 ----
      { /* Add new patch number below this line */
      + /**/
      + 54,
      /**/

      --
      ALL: A witch! A witch!
      WITCH: It's a fair cop.
      ALL: Burn her! Burn her! Let's make her into a ladder.
      "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

      /// 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 here: http://ICCF-Holland.org/click1.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.