mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix autocomplete select on blank / "no match"
This commit is contained in:
@ -2318,7 +2318,7 @@ export async function setSlashCommandAutoComplete(textarea, isFloating = false)
|
|||||||
case 'Enter':
|
case 'Enter':
|
||||||
case 'Tab': {
|
case 'Tab': {
|
||||||
// pick the selected item to autocomplete
|
// pick the selected item to autocomplete
|
||||||
if (evt.ctrlKey || evt.altKey || evt.shiftKey) return;
|
if (evt.ctrlKey || evt.altKey || evt.shiftKey || selectedItem.type == OPTION_TYPE.BLANK) return;
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopImmediatePropagation();
|
evt.stopImmediatePropagation();
|
||||||
select();
|
select();
|
||||||
|
@ -8,6 +8,7 @@ export const OPTION_TYPE = {
|
|||||||
'COMMAND': 1,
|
'COMMAND': 1,
|
||||||
'QUICK_REPLY': 2,
|
'QUICK_REPLY': 2,
|
||||||
'VARIABLE_NAME': 3,
|
'VARIABLE_NAME': 3,
|
||||||
|
'BLANK': 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
export class SlashCommandFuzzyScore {
|
export class SlashCommandFuzzyScore {
|
||||||
|
Reference in New Issue
Block a user