mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-26 19:09:58 +00:00
Simpler comparison
Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>
This commit is contained in:
@@ -65,10 +65,10 @@ function keyupEditAttention(event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// deselect surrounding whitespace
|
// deselect surrounding whitespace
|
||||||
while (target.value.slice(selectionStart, selectionStart + 1) == " " && selectionStart < selectionEnd) {
|
while (text[selectionStart] == " " && selectionStart < selectionEnd) {
|
||||||
selectionStart++;
|
selectionStart++;
|
||||||
}
|
}
|
||||||
while (target.value.slice(selectionEnd - 1, selectionEnd) == " " && selectionEnd > selectionStart) {
|
while (text[selectionEnd - 1] == " " && selectionEnd > selectionStart) {
|
||||||
selectionEnd--;
|
selectionEnd--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user