To: vim-dev@vim.org
Subject: Patch 6.2f.023
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------
Patch 6.2f.023
Problem: When the help files are not in $VIMRUNTIME but 'helpfile' is
correct Vim still can't find the help files.
Solution: Also look for a tags file in the directory of 'helpfile'.
Files: src/tag.c
*** ../vim-6.2f.022/src/tag.c Mon May 26 22:15:06 2003
--- src/tag.c Thu May 29 19:17:13 2003
***************
*** 2036,2048 ****
--- 2036,2052 ----
static void *search_ctx = NULL;
static char_u *np = NULL;
static int did_filefind_init;
+ static int did_use_hf = FALSE;
char_u *fname = NULL;
char_u *r_ptr;
if (first)
{
if (curbuf->b_help)
+ {
np = p_rtp;
+ did_use_hf = FALSE;
+ }
else if (*curbuf->b_p_tags != NUL)
np = curbuf->b_p_tags;
else
***************
*** 2062,2068 ****
* 'runtimepath'.
*/
if (*np == NUL || copy_option_part(&np, buf, MAXPATHL, ",") == 0)
! return FAIL;
add_pathsep(buf);
#ifndef COLON_AS_PATHSEP
STRCAT(buf, "doc/tags");
--- 2066,2082 ----
* 'runtimepath'.
*/
if (*np == NUL || copy_option_part(&np, buf, MAXPATHL, ",") == 0)
! {
! if (did_use_hf || *p_hf == NUL)
! return FAIL;
!
! /* Not found in 'runtimepath', use 'helpfile', replacing
! * "help.txt" with "tags". */
! did_use_hf = TRUE;
! STRCPY(buf, p_hf);
! STRCPY(gettail(buf), "tags");
! return OK;
! }
add_pathsep(buf);
#ifndef COLON_AS_PATHSEP
STRCAT(buf, "doc/tags");
*** ../vim-6.2f.022/src/version.c Thu May 29 17:22:59 2003
--- src/version.c Thu May 29 19:51:38 2003
***************
*** 632,633 ****
--- 632,635 ----
{ /* Add new patch number below this line */
+ /**/
+ 23,
/**/
--
For a moment, nothing happened.
Then, after a second or so, nothing continued to happen.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
/// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///
.