mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
restore selection on non-replace select
This commit is contained in:
@ -2266,6 +2266,13 @@ export async function setSlashCommandAutoComplete(textarea, isFloating = false)
|
||||
textarea.selectionStart = parserResult.start - 2 + selectedItem.replacer.length;
|
||||
textarea.selectionEnd = textarea.selectionStart;
|
||||
show();
|
||||
} else {
|
||||
const selectionStart = textarea.selectionStart;
|
||||
const selectionEnd = textarea.selectionDirection;
|
||||
await pointerup;
|
||||
textarea.focus();
|
||||
textarea.selectionStart = selectionStart;
|
||||
textarea.selectionDirection = selectionEnd;
|
||||
}
|
||||
};
|
||||
const showAutoCompleteDebounced = show;
|
||||
|
Reference in New Issue
Block a user