From 4865eb5d5a0ded64215a98651ab23dc6404681c2 Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Wed, 25 Jan 2023 15:31:15 +0800 Subject: [PATCH] fix:adjust selection boundary --- src/editor/core/event/handlers/keydown.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/core/event/handlers/keydown.ts b/src/editor/core/event/handlers/keydown.ts index a5c43ff..5e6ca6f 100644 --- a/src/editor/core/event/handlers/keydown.ts +++ b/src/editor/core/event/handlers/keydown.ts @@ -120,7 +120,7 @@ export function keydown(evt: KeyboardEvent, host: CanvasEvent) { } } else if (evt.key === KeyMap.Right) { if (isReadonly) return - if (index < positionList.length - 1) { + if (index < positionList.length) { const curIndex = endIndex + 1 // shift则缩放选区 let anchorStartIndex = curIndex