fix: three click selection paragraph boundary error #742
Co-authored-by: Hufe <huangyunfeihufe@hotmail.com>
This commit is contained in:
@@ -195,7 +195,10 @@ function threeClick(host: CanvasEvent) {
|
|||||||
}
|
}
|
||||||
if (newStartIndex < 0) return
|
if (newStartIndex < 0) return
|
||||||
let newEndIndex = index + downCount + 1
|
let newEndIndex = index + downCount + 1
|
||||||
if (elementList[newEndIndex]?.value === ZERO) {
|
if (
|
||||||
|
elementList[newEndIndex]?.value === ZERO ||
|
||||||
|
newEndIndex > elementList.length - 1
|
||||||
|
) {
|
||||||
newEndIndex -= 1
|
newEndIndex -= 1
|
||||||
}
|
}
|
||||||
rangeManager.setRange(newStartIndex, newEndIndex)
|
rangeManager.setRange(newStartIndex, newEndIndex)
|
||||||
|
|||||||
Reference in New Issue
Block a user