action/command: Allow multiple help pages to be opened

This commit is contained in:
Jöran Karl
2024-10-13 13:03:16 +02:00
parent 26f0806915
commit 2c62d4b70c
2 changed files with 11 additions and 8 deletions

View File

@@ -488,13 +488,15 @@ func (h *BufPane) HelpCmd(args []string) {
forceSplit = true
}
if config.FindRuntimeFile(config.RTHelp, topics[0]) != nil {
err := h.openHelp(topics[0], hsplit, forceSplit)
if err != nil {
InfoBar.Error(err)
for _, topic := range topics {
if config.FindRuntimeFile(config.RTHelp, topic) != nil {
err := h.openHelp(topic, hsplit, forceSplit)
if err != nil {
InfoBar.Error(err)
}
} else {
InfoBar.Error("Sorry, no help for ", topic)
}
} else {
InfoBar.Error("Sorry, no help for ", topics[0])
}
}
}