From 27d085fbab813f2d923b88924b1b4b82cfa0c977 Mon Sep 17 00:00:00 2001 From: Quinten Kock Date: Wed, 29 Oct 2025 17:08:56 +0100 Subject: [PATCH] Add auto-focus on opening files --- src/app/editorgrid.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/editorgrid.ts b/src/app/editorgrid.ts index 08eac54..6e910d1 100644 --- a/src/app/editorgrid.ts +++ b/src/app/editorgrid.ts @@ -24,6 +24,8 @@ export function addEditor(file: OpenFile) { console.log("Adding editor to tab ", currentTab.val, editors); const editor = file.createEditor(); editors[currentTab.val].push(vanX.noreactive(editor)); + editor.view.dom.scrollIntoView(); + editor.view.focus(); } export function addTab(file?: OpenFile) {