From ce3bf6bae4b21a86ade98c40f1af0ec72302ef73 Mon Sep 17 00:00:00 2001 From: Ben Henning Date: Thu, 15 May 2025 21:42:25 +0000 Subject: [PATCH] fix: Limit LineCursor<-focus syncing. This ensures that non-block cases don't actually change LineCursor state (which can cause some synchronization inconsistencies that then break navigation). --- core/keyboard_nav/line_cursor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/keyboard_nav/line_cursor.ts b/core/keyboard_nav/line_cursor.ts index 9d83f6554d3..341e6086407 100644 --- a/core/keyboard_nav/line_cursor.ts +++ b/core/keyboard_nav/line_cursor.ts @@ -377,7 +377,7 @@ export class LineCursor extends Marker { // Ensure the current node matches what's currently focused. const focused = getFocusManager().getFocusedNode(); const block = this.getSourceBlockFromNode(focused); - if (!block || block.workspace === this.workspace) { + if (block && block.workspace === this.workspace) { // If the current focused node corresponds to a block then ensure that it // belongs to the correct workspace for this cursor. this.setCurNode(focused);