vim-help.patch revision 379
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw--- src/ex_cmds.c Thu Apr 21 16:23:08 2011
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+++ src/ex_cmds.c Thu Apr 21 16:23:08 2011
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw@@ -5525,6 +5525,8 @@
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw char_u *lang;
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ int nohelp = FALSE, nominhelp = FALSE;
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ char_u *mhf = NULL;
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw if (eap != NULL)
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw@@ -5576,6 +5578,23 @@
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw n = find_help_tags(arg, &num_matches, &matches,
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw eap != NULL && eap->forceit);
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ * If we didn't find the help topic, check to see whether 'helpfile'
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ * (typically $VIMRUNTIME/doc/help.txt) exists. If not, then we'll send the
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ * user to the minimized help file delivered with the core vim package which
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ * explains why there's no help and how to get it.
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ if (num_matches == 0 && mch_access((char *)p_hf, F_OK) < 0) {
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ nohelp = TRUE;
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ mhf = alloc(MAXPATHL);
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ STRNCPY(mhf, p_hf, MAXPATHL - 1);
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ mhf[STRLEN(mhf) - 8] = '\0';
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ STRNCAT(mhf, "help_minimized.txt", MAXPATHL - STRLEN(mhf) - 1);
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ if (mch_access((char *)mhf, F_OK) < 0)
c5c4113dfcabb1eed3d4bdf7609de5170027a794nw+ nominhelp = TRUE;