Fix issue where cmd/ctrl + left arrow after a tab character would cause exception (#6588)

This commit is contained in:
Mo
2024-09-06 10:38:39 -05:00
committed by GitHub
parent fe4fcfefbe
commit 8a3eb1105c
2 changed files with 31 additions and 0 deletions

View File

@ -773,7 +773,9 @@ function $handleMoveTo(
const focusNode = focus.getNode();
const isMoveToStart = type === MOVE_TO_START;
// Ensure the selection is within the codeblock
if (
!$isSelectionInCode(selection) ||
!($isCodeHighlightNode(anchorNode) || $isTabNode(anchorNode)) ||
!($isCodeHighlightNode(focusNode) || $isTabNode(focusNode))
) {