ONLY reload current file on changes.

This commit is contained in:
49lf
2024-11-13 01:10:48 -05:00
parent 00c0c993f2
commit c1c1f817c9

View File

@ -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)