don't hide secondary autocomplete values on select or fully typed

This commit is contained in:
LenAnderson 2024-06-16 08:41:05 -04:00
parent d75b30d51a
commit 7ebf23e9e6
2 changed files with 2 additions and 2 deletions

View File

@ -398,7 +398,7 @@ export class AutoComplete {
,
);
this.result.push(option);
} else if (this.result.length == 1 && this.effectiveParserResult && this.result[0].name == this.effectiveParserResult.name) {
} else if (this.result.length == 1 && this.effectiveParserResult && this.effectiveParserResult != this.secondaryParserResult && this.result[0].name == this.effectiveParserResult.name) {
// only one result that is exactly the current value? just show hint, no autocomplete
this.isReplaceable = false;
this.isShowingDetails = false;

View File

@ -177,7 +177,7 @@ export class SlashCommandAutoCompleteNameResult extends AutoCompleteNameResult {
);
const isCompleteValue = enumList.find(it=>it.value == value);
const isSelectedValue = isSelect && isCompleteValue;
result.isRequired = cmdArg.isRequired && !isSelectedValue && !isCompleteValue;
result.isRequired = cmdArg.isRequired && !isSelectedValue;
result.forceMatch = cmdArg.forceEnum;
return result;
}