This commit is contained in:
James McCoy
2017-03-11 00:26:44 -05:00
parent 2ed2b1d505
commit d72c177b2a
9 changed files with 78 additions and 81 deletions

View File

@@ -4363,9 +4363,9 @@ void ex_help(exarg_T *eap)
if (!curwin->w_buffer->b_help
|| cmdmod.tab != 0
) {
if (cmdmod.tab != 0)
if (cmdmod.tab != 0) {
wp = NULL;
else {
} else {
wp = NULL;
FOR_ALL_WINDOWS_IN_TAB(wp2, curtab) {
if (wp2->w_buffer != NULL && wp2->w_buffer->b_help) {
@@ -4374,13 +4374,11 @@ void ex_help(exarg_T *eap)
}
}
}
if (wp != NULL && wp->w_buffer->b_nwindows > 0)
if (wp != NULL && wp->w_buffer->b_nwindows > 0) {
win_enter(wp, true);
else {
/*
* There is no help window yet.
* Try to open the file specified by the "helpfile" option.
*/
} else {
// There is no help window yet.
// Try to open the file specified by the "helpfile" option.
if ((helpfd = mch_fopen((char *)p_hf, READBIN)) == NULL) {
smsg(_("Sorry, help file \"%s\" not found"), p_hf);
goto erret;