remove file tree from diff
This commit is contained in:
@ -21,8 +21,8 @@ import { ContextMenu, ContextMenuItem } from './ContextMenu'
|
|||||||
import usePlatform from 'hooks/usePlatform'
|
import usePlatform from 'hooks/usePlatform'
|
||||||
import { FileEntry } from 'lib/project'
|
import { FileEntry } from 'lib/project'
|
||||||
import { useFileSystemWatcher } from 'hooks/useFileSystemWatcher'
|
import { useFileSystemWatcher } from 'hooks/useFileSystemWatcher'
|
||||||
import { reportRejection } from 'lib/trap'
|
|
||||||
import { normalizeLineEndings } from 'lib/codeEditor'
|
import { normalizeLineEndings } from 'lib/codeEditor'
|
||||||
|
import { reportRejection } from 'lib/trap'
|
||||||
|
|
||||||
function getIndentationCSS(level: number) {
|
function getIndentationCSS(level: number) {
|
||||||
return `calc(1rem * ${level + 1})`
|
return `calc(1rem * ${level + 1})`
|
||||||
@ -198,6 +198,7 @@ const FileTreeItem = ({
|
|||||||
codeManager.writeCausedByAppCheckedInFileTreeFileSystemWatcher = false
|
codeManager.writeCausedByAppCheckedInFileTreeFileSystemWatcher = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCurrentFile && eventType === 'change') {
|
if (isCurrentFile && eventType === 'change') {
|
||||||
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user