7047N/A int old_KeyTyped = KeyTyped;
379N/A+ int nohelp = FALSE, nominhelp = FALSE;
379N/A n = find_help_tags(arg, &num_matches, &matches,
379N/A eap != NULL && eap->forceit);
379N/A+ * If we didn't find the help topic, check to see whether 'helpfile'
379N/A+ * user to the minimized help file delivered with the core vim package which
379N/A+ * explains why there's no help and how to get it.
379N/A+ if (num_matches == 0 && mch_access((char *)p_hf, F_OK) < 0) {
379N/A+ mhf = alloc(MAXPATHL);
379N/A+ STRNCPY(mhf, p_hf, MAXPATHL - 1);
379N/A+ mhf[STRLEN(mhf) - 8] = '\0';
379N/A+ if (mch_access((char *)mhf, F_OK) < 0)
379N/A if (n != FAIL && lang != NULL)
379N/A- if (i >= num_matches || n == FAIL)
379N/A+ if (!nohelp && i >= num_matches || n == FAIL)
379N/A- /* The first match (in the requested language) is the best match. */
379N/A- tag = vim_strsave(matches[i]);
379N/A- FreeWild(num_matches, matches);
379N/A+ /* The first match (in the requested language) is the best match. */
379N/A+ tag = vim_strsave(matches[i]);
379N/A+ FreeWild(num_matches, matches);
379N/A need_mouse_correct = TRUE;
379N/A * There is no help window yet.
379N/A * Try to open the file specified by the "helpfile" option.
379N/A- if ((helpfd = mch_fopen((char *)p_hf, READBIN)) == NULL)
379N/A- smsg((char_u *)_("Sorry, help file \"%s\" not found"), p_hf);
379N/A+ if (!nohelp || nominhelp) {
379N/A+ if ((helpfd = mch_fopen((char *)p_hf, READBIN)) == NULL)
379N/A+ smsg((char_u *)_("Sorry, help file \"%s\" not found"), p_hf);
379N/A /* Split off help window; put it at far top if no position
379N/A * Set the alternate file to the previously edited file.
379N/A alt_fnum = curbuf->b_fnum;
379N/A- (void)do_ecmd(0, NULL, NULL, NULL, ECMD_LASTL,
379N/A+ (void)do_ecmd(0, mhf, NULL, NULL, ECMD_LASTL,
379N/A ECMD_HIDE + ECMD_SET_HELP,
379N/A NULL /* buffer is still open, don't store info */
379N/A+ if (!nohelp && tag != NULL)
379N/A do_tag(tag, DT_HELP, 1, FALSE, TRUE);
379N/A /* Delete the empty buffer if we're not using it. Careful: autocommands
379N/A curwin->w_alt_fnum = alt_fnum;