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

Patch 7.3.734

Expand Messages
  • Bram Moolenaar
    Patch 7.3.734 Problem: Cannot put help files in a sub-directory. Solution: Make :helptags work for sub-directories. (Charles Campbell) Files:
    Message 1 of 1 , Nov 28, 2012
    • 0 Attachment
      Patch 7.3.734
      Problem: Cannot put help files in a sub-directory.
      Solution: Make :helptags work for sub-directories. (Charles Campbell)
      Files: src/ex_cmds.c


      *** ../vim-7.3.733/src/ex_cmds.c 2012-09-05 15:15:01.000000000 +0200
      --- src/ex_cmds.c 2012-11-28 15:59:58.000000000 +0100
      ***************
      *** 6344,6353 ****
      }

      #ifdef FEAT_MULTI_LANG
      ! /* Get a list of all files in the directory. */
      STRCPY(NameBuff, dirname);
      add_pathsep(NameBuff);
      ! STRCAT(NameBuff, "*");
      if (gen_expand_wildcards(1, &NameBuff, &filecount, &files,
      EW_FILE|EW_SILENT) == FAIL
      || filecount == 0)
      --- 6344,6353 ----
      }

      #ifdef FEAT_MULTI_LANG
      ! /* Get a list of all files in the help directory and in subdirectories. */
      STRCPY(NameBuff, dirname);
      add_pathsep(NameBuff);
      ! STRCAT(NameBuff, "**");
      if (gen_expand_wildcards(1, &NameBuff, &filecount, &files,
      EW_FILE|EW_SILENT) == FAIL
      || filecount == 0)
      ***************
      *** 6436,6443 ****
      helptags_one(dir, ext, tagfname, add_help_tags)
      char_u *dir; /* doc directory */
      char_u *ext; /* suffix, ".txt", ".itx", ".frx", etc. */
      ! char_u *tagfname; /* "tags" for English, "tags-fr" for French. */
      ! int add_help_tags; /* add "help-tags" tag */
      {
      FILE *fd_tags;
      FILE *fd;
      --- 6436,6443 ----
      helptags_one(dir, ext, tagfname, add_help_tags)
      char_u *dir; /* doc directory */
      char_u *ext; /* suffix, ".txt", ".itx", ".frx", etc. */
      ! char_u *tagfname; /* "tags" for English, "tags-fr" for French. */
      ! int add_help_tags; /* add "help-tags" tag */
      {
      FILE *fd_tags;
      FILE *fd;
      ***************
      *** 6449,6454 ****
      --- 6449,6455 ----
      char_u *s;
      int i;
      char_u *fname;
      + int dirlen;
      # ifdef FEAT_MBYTE
      int utf8 = MAYBE;
      int this_utf8;
      ***************
      *** 6459,6467 ****
      /*
      * Find all *.txt files.
      */
      STRCPY(NameBuff, dir);
      ! add_pathsep(NameBuff);
      ! STRCAT(NameBuff, "*");
      STRCAT(NameBuff, ext);
      if (gen_expand_wildcards(1, &NameBuff, &filecount, &files,
      EW_FILE|EW_SILENT) == FAIL
      --- 6460,6468 ----
      /*
      * Find all *.txt files.
      */
      + dirlen = STRLEN(dir);
      STRCPY(NameBuff, dir);
      ! STRCAT(NameBuff, "/**/*");
      STRCAT(NameBuff, ext);
      if (gen_expand_wildcards(1, &NameBuff, &filecount, &files,
      EW_FILE|EW_SILENT) == FAIL
      ***************
      *** 6522,6528 ****
      EMSG2(_("E153: Unable to open %s for reading"), files[fi]);
      continue;
      }
      ! fname = gettail(files[fi]);

      # ifdef FEAT_MBYTE
      firstline = TRUE;
      --- 6523,6529 ----
      EMSG2(_("E153: Unable to open %s for reading"), files[fi]);
      continue;
      }
      ! fname = files[fi] + dirlen + 1;

      # ifdef FEAT_MBYTE
      firstline = TRUE;
      *** ../vim-7.3.733/src/version.c 2012-11-28 15:55:37.000000000 +0100
      --- src/version.c 2012-11-28 15:58:26.000000000 +0100
      ***************
      *** 727,728 ****
      --- 727,730 ----
      { /* Add new patch number below this line */
      + /**/
      + 734,
      /**/

      --
      From "know your smileys":
      y:-) Bad toupee

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ an exciting new programming language -- http://www.Zimbu.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.