Commit 5ab5405b authored by catboxanon's avatar catboxanon Committed by GitHub

Simpler comparison

Co-authored-by: default avatarmissionfloyd <missionfloyd@users.noreply.github.com>
parent 766f6e3e
......@@ -65,10 +65,10 @@ function keyupEditAttention(event) {
}
// deselect surrounding whitespace
while (target.value.slice(selectionStart, selectionStart + 1) == " " && selectionStart < selectionEnd) {
while (text[selectionStart] == " " && selectionStart < selectionEnd) {
selectionStart++;
}
while (target.value.slice(selectionEnd - 1, selectionEnd) == " " && selectionEnd > selectionStart) {
while (text[selectionEnd - 1] == " " && selectionEnd > selectionStart) {
selectionEnd--;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment