* help.c (interactive_display): Fallback to node "[main]" if the
requested node cannot be found.
Этот коммит содержится в:
родитель
afae5939cd
Коммит
00baa9f8fe
@ -1,5 +1,8 @@
|
|||||||
2002-09-03 Pavel Roskin <proski@gnu.org>
|
2002-09-03 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* help.c (interactive_display): Fallback to node "[main]" if the
|
||||||
|
requested node cannot be found.
|
||||||
|
|
||||||
* help.c (help_index_cmd): Eliminate unneeded search for
|
* help.c (help_index_cmd): Eliminate unneeded search for
|
||||||
"[Help]", which always fails. Fix crash if "[Contents]" cannot
|
"[Help]", which always fails. Fix crash if "[Contents]" cannot
|
||||||
be found. Reuse more generic error message.
|
be found. Reuse more generic error message.
|
||||||
|
@ -778,9 +778,14 @@ interactive_display (char *filename, char *node)
|
|||||||
if (!(main_node = search_string (data, node))) {
|
if (!(main_node = search_string (data, node))) {
|
||||||
message (1, MSG_ERROR, _(" Cannot find node %s in help file "),
|
message (1, MSG_ERROR, _(" Cannot find node %s in help file "),
|
||||||
node);
|
node);
|
||||||
|
|
||||||
|
/* Fallback to [main], return if it also cannot be found */
|
||||||
|
main_node = search_string (data, "[main]");
|
||||||
|
if (!main_node) {
|
||||||
interactive_display_finish ();
|
interactive_display_finish ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
help_lines = min (LINES - 4, max (2 * LINES / 3, 18));
|
help_lines = min (LINES - 4, max (2 * LINES / 3, 18));
|
||||||
|
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user