Fixed text area selection border cases. Fixes #988

This commit is contained in:
Oliver 2024-05-19 10:01:16 +02:00
parent ed116790de
commit fc5680eecb
1 changed files with 2 additions and 1 deletions

View File

@ -702,7 +702,8 @@ RowLoop:
for { for {
if pos[0] == next[0] { if pos[0] == next[0] {
if start >= index+lineIndex && start < index+lineIndex+next[1]-pos[1] || if start >= index+lineIndex && start < index+lineIndex+next[1]-pos[1] ||
end >= index+lineIndex && end < index+lineIndex+next[1]-pos[1] { end >= index+lineIndex && end < index+lineIndex+next[1]-pos[1] ||
next[0] == 1 && (start == t.length || end == t.length) { // Special case for the end of the text.
break break
} }
index += lineIndex + next[1] - pos[1] index += lineIndex + next[1] - pos[1]