Skip to content

Commit 438eda1

Browse files
hi-ogawaOpenCode
andauthored
fix(ui): fix code editor error and annotations gadgets layout shifts (#10969)
Co-authored-by: Hiroshi Ogawa <[email protected]> Co-authored-by: OpenCode <[email protected]>
1 parent 5e69aba commit 438eda1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

packages/ui/client/components/views/ViewEditor.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ function createAnnotationElement(annotation: TestAnnotation) {
327327
}
328328
329329
const { pause, resume } = watch(
330-
[codemirrorRef, errors, annotations, finished] as const,
331-
([cmValue, errors, annotations, end]) => {
330+
[codemirrorRef, errors, annotations, finished, loading] as const,
331+
([cmValue, errors, annotations, end, loadingFile]) => {
332332
if (!cmValue) {
333333
widgets.length = 0
334334
handles.length = 0
@@ -351,7 +351,7 @@ const { pause, resume } = watch(
351351
widgets.length = 0
352352
handles.length = 0
353353
354-
setTimeout(() => {
354+
if (!loadingFile) {
355355
// add new data
356356
errors.forEach(createErrorElement)
357357
@@ -363,9 +363,9 @@ const { pause, resume } = watch(
363363
}
364364
365365
cmValue.on('changes', codemirrorChanges)
366-
}, 100)
366+
}
367367
},
368-
{ flush: 'post' },
368+
{ immediate: true },
369369
)
370370
371371
watchDebounced(() => [finished.value, saving.value, currentPosition.value] as const, ([f, s], old) => {

0 commit comments

Comments
 (0)