diff --git a/src/components/FileTree.tsx b/src/components/FileTree.tsx index 2eecccfc7..b3506df40 100644 --- a/src/components/FileTree.tsx +++ b/src/components/FileTree.tsx @@ -196,8 +196,7 @@ const FileTreeItem = ({ return } - // Don't try to read a file that was removed. - if (isCurrentFile && eventType !== 'unlink') { + if (isCurrentFile && eventType === 'change') { let code = await window.electron.readFile(path, { encoding: 'utf-8' }) code = normalizeLineEndings(code) codeManager.updateCodeStateEditor(code)