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

Patch 5.6.053

Expand Messages
  • Bram Moolenaar
    Patch 5.6.053 Problem: CTRL-] doesn t work on a tag that contains a | . (Cesar Crusius) Solution: Escape | , and in tag names when using CTRL-]
    Message 1 of 1 , Apr 3, 2000
    • 0 Attachment
      Patch 5.6.053
      Problem: CTRL-] doesn't work on a tag that contains a '|'. (Cesar Crusius)
      Solution: Escape '|', '"' and '\' in tag names when using CTRL-] and also
      for command-line completion.
      Files: src/ex_getln.c, src/normal.c


      *** ../vim-5.6.52/src/ex_getln.c Sun Apr 2 11:57:11 2000
      --- src/ex_getln.c Mon Apr 3 21:09:20 2000
      ***************
      *** 2137,2151 ****
      if (options & WILD_HOME_REPLACE)
      tilde_replace(str, cmd_numfiles, cmd_files);

      ! /*
      ! * Insert backslashes into a file name before a space, \, %, # and
      ! * wildmatch characters, except '~'.
      ! */
      ! if ((options & WILD_ESCAPE)
      ! && (expand_context == EXPAND_FILES
      ! || expand_context == EXPAND_BUFFERS
      ! || expand_context == EXPAND_DIRECTORIES))
      {
      for (i = 0; i < cmd_numfiles; ++i)
      {
      /* for ":set path=" we need to escape spaces twice */
      --- 2137,2152 ----
      if (options & WILD_HOME_REPLACE)
      tilde_replace(str, cmd_numfiles, cmd_files);

      ! if (options & WILD_ESCAPE)
      {
      + if (expand_context == EXPAND_FILES
      + || expand_context == EXPAND_BUFFERS
      + || expand_context == EXPAND_DIRECTORIES)
      + {
      + /*
      + * Insert a backslash into a file name before a space, \, %, #
      + * and wildmatch characters, except '~'.
      + */
      for (i = 0; i < cmd_numfiles; ++i)
      {
      /* for ":set path=" we need to escape spaces twice */
      ***************
      *** 2200,2205 ****
      --- 2201,2223 ----
      }
      }
      expand_set_path = FALSE;
      + }
      + else if (expand_context == EXPAND_TAGS)
      + {
      + /*
      + * Insert a backslash before characters in a tag name that
      + * would terminate the ":tag" command.
      + */
      + for (i = 0; i < cmd_numfiles; ++i)
      + {
      + p = vim_strsave_escaped(cmd_files[i], (char_u *)"\\|\"");
      + if (p != NULL)
      + {
      + vim_free(cmd_files[i]);
      + cmd_files[i] = p;
      + }
      + }
      + }
      }

      /*
      *** ../vim-5.6.52/src/normal.c Sun Apr 2 13:04:17 2000
      --- src/normal.c Mon Apr 3 20:38:52 2000
      ***************
      *** 3756,3763 ****
      else if (cmdchar == 'K' && *p_kp != NUL)
      aux_ptr = escape_chars;
      else
      ! /* Don't escape chars in tag with a backslash */
      ! aux_ptr = (char_u *)"";
      while (n--)
      {
      /* put a backslash before \ and some others */
      --- 3757,3764 ----
      else if (cmdchar == 'K' && *p_kp != NUL)
      aux_ptr = escape_chars;
      else
      ! /* Don't escape spaces and Tabs in a tag with a backslash */
      ! aux_ptr = (char_u *)"\\|\"";
      while (n--)
      {
      /* put a backslash before \ and some others */
      *** ../vim-5.6.52/src/version.c Mon Apr 3 09:38:10 2000
      --- src/version.c Mon Apr 3 21:05:42 2000
      ***************
      *** 420,421 ****
      --- 420,423 ----
      { /* Add new patch number below this line */
      + /**/
      + 53,
      /**/

      --
      No man may purchase alcohol without written consent from his wife.
      [real standing law in Pennsylvania, United States of America]

      /-/-- Bram Moolenaar --- Bram@... --- http://www.moolenaar.net --\-\
      \-\-- Vim: http://www.vim.org ---- ICCF Holland: http://www.vim.org/iccf --/-/
    Your message has been successfully submitted and would be delivered to recipients shortly.