improve: cursor selection at the beginning of a line #202

Co-authored-by: Hufe921 <huangyunfeihufe@hotmail.com>
pr675
zhoujingfu 3 years ago committed by GitHub
parent 16c2e9a6d7
commit a1335850a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -332,7 +332,10 @@ export class Position {
// 是否在头部
if (isHead) {
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 {
curPositionIndex = index
}

Loading…
Cancel
Save