optimize slash command helper popup
This commit is contained in:
parent
39b305621e
commit
db3d86cb29
|
@ -1822,8 +1822,8 @@ async function executeSlashCommands(text, unescape = false) {
|
||||||
function setSlashCommandAutocomplete(textarea) {
|
function setSlashCommandAutocomplete(textarea) {
|
||||||
textarea.autocomplete({
|
textarea.autocomplete({
|
||||||
source: (input, output) => {
|
source: (input, output) => {
|
||||||
// Only show for slash commands and if there's no space
|
// 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(' ')) {
|
if (!input.term.startsWith('/') || input.term.includes(' ') || input.term === '/') {
|
||||||
output([]);
|
output([]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue