Skip to content

Commit

Permalink
fix(editor): reduce reactivity
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanSalt committed Nov 25, 2024
1 parent a1992dc commit be0dd77
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions addons/editor/src/renderer/CodeEditorPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ const file = $computed(() => tab.shell)
let source = $(commas.remote.useFile($$(file)))
let code = $computed({
get: () => source,
set: (value: string) => {
source = value
},
})
const isDirty = $computed(() => {
return Boolean(source === undefined || editor?.isDirty)
})
Expand Down Expand Up @@ -77,7 +70,7 @@ defineExpose({
<TerminalBlock :tab="tab" class="code-editor-pane" @contextmenu="openEditingMenu">
<CodeEditor
ref="editor"
v-model="code"
v-model="source"
:file="file"
/>
</TerminalBlock>
Expand Down

0 comments on commit be0dd77

Please sign in to comment.