Skip to content

Commit 8614d43

Browse files
committed
updated for version 7.3.734
Problem: Cannot put help files in a sub-directory. Solution: Make :helptags work for sub-directories. (Charles Campbell)
1 parent d9dc032 commit 8614d43

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/ex_cmds.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6344,10 +6344,10 @@ ex_helptags(eap)
63446344
}
63456345

63466346
#ifdef FEAT_MULTI_LANG
6347-
/* Get a list of all files in the directory. */
6347+
/* Get a list of all files in the help directory and in subdirectories. */
63486348
STRCPY(NameBuff, dirname);
63496349
add_pathsep(NameBuff);
6350-
STRCAT(NameBuff, "*");
6350+
STRCAT(NameBuff, "**");
63516351
if (gen_expand_wildcards(1, &NameBuff, &filecount, &files,
63526352
EW_FILE|EW_SILENT) == FAIL
63536353
|| filecount == 0)
@@ -6436,8 +6436,8 @@ ex_helptags(eap)
64366436
helptags_one(dir, ext, tagfname, add_help_tags)
64376437
char_u *dir; /* doc directory */
64386438
char_u *ext; /* suffix, ".txt", ".itx", ".frx", etc. */
6439-
char_u *tagfname; /* "tags" for English, "tags-fr" for French. */
6440-
int add_help_tags; /* add "help-tags" tag */
6439+
char_u *tagfname; /* "tags" for English, "tags-fr" for French. */
6440+
int add_help_tags; /* add "help-tags" tag */
64416441
{
64426442
FILE *fd_tags;
64436443
FILE *fd;
@@ -6449,6 +6449,7 @@ helptags_one(dir, ext, tagfname, add_help_tags)
64496449
char_u *s;
64506450
int i;
64516451
char_u *fname;
6452+
int dirlen;
64526453
# ifdef FEAT_MBYTE
64536454
int utf8 = MAYBE;
64546455
int this_utf8;
@@ -6459,9 +6460,9 @@ helptags_one(dir, ext, tagfname, add_help_tags)
64596460
/*
64606461
* Find all *.txt files.
64616462
*/
6463+
dirlen = STRLEN(dir);
64626464
STRCPY(NameBuff, dir);
6463-
add_pathsep(NameBuff);
6464-
STRCAT(NameBuff, "*");
6465+
STRCAT(NameBuff, "/**/*");
64656466
STRCAT(NameBuff, ext);
64666467
if (gen_expand_wildcards(1, &NameBuff, &filecount, &files,
64676468
EW_FILE|EW_SILENT) == FAIL
@@ -6522,7 +6523,7 @@ helptags_one(dir, ext, tagfname, add_help_tags)
65226523
EMSG2(_("E153: Unable to open %s for reading"), files[fi]);
65236524
continue;
65246525
}
6525-
fname = gettail(files[fi]);
6526+
fname = files[fi] + dirlen + 1;
65266527

65276528
# ifdef FEAT_MBYTE
65286529
firstline = TRUE;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@ static char *(features[]) =
725725

726726
static int included_patches[] =
727727
{ /* Add new patch number below this line */
728+
/**/
729+
734,
728730
/**/
729731
733,
730732
/**/

0 commit comments

Comments
 (0)