Fix show all condition

This commit is contained in:
Dominik Reh
2022-12-22 12:39:00 +01:00
parent 63a0d2e73e
commit bdd8cf68c7

View File

@@ -680,10 +680,9 @@ async function autocomplete(textArea, prompt, fixedTag = null) {
umiPreviousTags = umiTags;
// Show all condition
let currentSubPrompt = umiSubPrompts.find(x => x[0].includes(tagword[0]))[0];
let showAll = currentSubPrompt.endsWith("[") || currentSubPrompt.endsWith("[--") || currentSubPrompt.endsWith("|");
let showAll = tagword.endsWith("[") || tagword.endsWith("[--") || tagword.endsWith("|");
console.log(currentSubPrompt, umiTags, diff, tagCountChange)
console.log(tagword, umiTags, diff, tagCountChange)
// Exit early if the user closed the bracket manually
if ((!diff || diff.length === 0 || (diff.length === 1 && tagCountChange < 0)) && !showAll) {