ONLY reload current file on changes.
This commit is contained in:
@ -196,8 +196,7 @@ const FileTreeItem = ({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't try to read a file that was removed.
|
if (isCurrentFile && eventType === 'change') {
|
||||||
if (isCurrentFile && eventType !== 'unlink') {
|
|
||||||
let code = await window.electron.readFile(path, { encoding: 'utf-8' })
|
let code = await window.electron.readFile(path, { encoding: 'utf-8' })
|
||||||
code = normalizeLineEndings(code)
|
code = normalizeLineEndings(code)
|
||||||
codeManager.updateCodeStateEditor(code)
|
codeManager.updateCodeStateEditor(code)
|
||||||
|
Reference in New Issue
Block a user