improve: cursor selection at the beginning of a line #202
Co-authored-by: Hufe921 <huangyunfeihufe@hotmail.com>
This commit is contained in:
@@ -332,7 +332,10 @@ export class Position {
|
|||||||
// 是否在头部
|
// 是否在头部
|
||||||
if (isHead) {
|
if (isHead) {
|
||||||
const headIndex = positionList.findIndex(p => p.pageNo === positionNo && p.rowNo === lastLetterList[j].rowNo)
|
const headIndex = positionList.findIndex(p => p.pageNo === positionNo && p.rowNo === lastLetterList[j].rowNo)
|
||||||
curPositionIndex = ~headIndex ? headIndex - 1 : index
|
// 头部元素为空元素时无需选中
|
||||||
|
curPositionIndex = ~headIndex
|
||||||
|
? positionList[headIndex].value === ZERO ? headIndex : headIndex - 1
|
||||||
|
: index
|
||||||
} else {
|
} else {
|
||||||
curPositionIndex = index
|
curPositionIndex = index
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user