fix: three click selection paragraph boundary error #742

Co-authored-by: Hufe <huangyunfeihufe@hotmail.com>
npr765
daria2023 2 years ago committed by GitHub
parent dd1b53ee62
commit 9dd192ffd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -195,7 +195,10 @@ function threeClick(host: CanvasEvent) {
}
if (newStartIndex < 0) return
let newEndIndex = index + downCount + 1
if (elementList[newEndIndex]?.value === ZERO) {
if (
elementList[newEndIndex]?.value === ZERO ||
newEndIndex > elementList.length - 1
) {
newEndIndex -= 1
}
rangeManager.setRange(newStartIndex, newEndIndex)

Loading…
Cancel
Save