From db3d86cb29301cd0d1df2fd994a9e0dcf46e8f1a Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Fri, 19 Apr 2024 21:02:02 +0900 Subject: [PATCH] optimize slash command helper popup --- public/scripts/slash-commands.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index b403205e9..25e45039b 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -1822,8 +1822,8 @@ async function executeSlashCommands(text, unescape = false) { function setSlashCommandAutocomplete(textarea) { textarea.autocomplete({ source: (input, output) => { - // Only show for slash commands and if there's no space - if (!input.term.startsWith('/') || input.term.includes(' ')) { + // Only show for slash commands (requiring at least 1 letter after the slash) and if there's no space + if (!input.term.startsWith('/') || input.term.includes(' ') || input.term === '/') { output([]); return; }