🐛 Fix issues with intermediary command help
This commit is contained in:
parent
22993a46d7
commit
f7bc31df27
1 changed files with 8 additions and 3 deletions
|
|
@ -203,9 +203,14 @@ public final class CommandHelpHandler<C> {
|
||||||
outer: while (head != null) {
|
outer: while (head != null) {
|
||||||
++index;
|
++index;
|
||||||
traversedNodes.add(head.getValue());
|
traversedNodes.add(head.getValue());
|
||||||
if (head.isLeaf()) {
|
|
||||||
return new VerboseHelpTopic<>(head.getValue().getOwningCommand());
|
if (head.getValue() != null && head.getValue().getOwningCommand() != null) {
|
||||||
} else if (head.getChildren().size() == 1) {
|
if (head.isLeaf() || index == queryFragments.length) {
|
||||||
|
return new VerboseHelpTopic<>(head.getValue().getOwningCommand());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (head.getChildren().size() == 1) {
|
||||||
head = head.getChildren().get(0);
|
head = head.getChildren().get(0);
|
||||||
} else {
|
} else {
|
||||||
if (index < queryFragments.length) {
|
if (index < queryFragments.length) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue