fix(app): update tab file contents on change

This commit is contained in:
Adam
2026-02-09 07:22:40 -06:00
parent 03f3029dc6
commit 30f0d3b394
3 changed files with 37 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ type WatcherEvent = {
type WatcherOps = {
normalize: (input: string) => string
hasFile: (path: string) => boolean
isOpen?: (path: string) => boolean
loadFile: (path: string) => void
node: (path: string) => FileNode | undefined
isDirLoaded: (path: string) => boolean
@@ -27,7 +28,7 @@ export function invalidateFromWatcher(event: WatcherEvent, ops: WatcherOps) {
if (!path) return
if (path.startsWith(".git/")) return
if (ops.hasFile(path)) {
if (ops.hasFile(path) || ops.isOpen?.(path)) {
ops.loadFile(path)
}