mirror of https://github.com/rivo/tview.git
Fixed text area selection border cases. Fixes #988
This commit is contained in:
parent
ed116790de
commit
fc5680eecb
|
@ -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]
|
||||||
|
|
Loading…
Reference in New Issue