From 87fcf9bf93148928daf5608f6b653f909eaf9846 Mon Sep 17 00:00:00 2001 From: Jonathan van Rij Date: Tue, 16 Jun 2026 09:36:44 +0200 Subject: [PATCH] open in diff or in updated mode --- src/renderer/src/App.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index c881d67..3c717fc 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -274,7 +274,10 @@ export function App(): React.ReactElement { setHistory((h) => [path, ...h.filter((p) => p !== path)].slice(0, 100)) actions.ensureFile(path) setActive(path) - setTabMode((m) => ({ ...m, [path]: opts.diff && changed ? defaultMode : (m[path] || (changed ? defaultMode : 'code')) })) + // Git rows open the diff; explorer / recent-files open the updated view. + // Unchanged files only have the plain editable "code" view. + const openMode: Mode = changed ? (opts.diff ? 'diff' : 'updated') : 'code' + setTabMode((m) => ({ ...m, [path]: openMode })) reveal(path) if (opts.line) { // show the current/updated file so line numbers map to search hits @@ -418,7 +421,7 @@ export function App(): React.ReactElement { + onOpen={openFile} onContext={openMenu} activePath={active} showDir={gitW > 300} /> { setAutoResize(false); setGitW((w) => clamp(w + dx, 160, 460)) }} />