mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-18 04:43:55 +00:00
refac
This commit is contained in:
parent
0b3812f285
commit
3288fe010a
1 changed files with 9 additions and 1 deletions
|
|
@ -432,6 +432,8 @@
|
|||
const resized = alignmentDocuments && geometry !== alignmentGeometry;
|
||||
alignmentDocuments = documents;
|
||||
alignmentGeometry = geometry;
|
||||
const previousSpacersA = view.a.state.field(lineAlignment);
|
||||
const previousSpacersB = view.b.state.field(lineAlignment);
|
||||
if (!reset || !clearLineAlignment(view.a, view.b))
|
||||
alignChangedLines(view.a, view.b, view.chunks);
|
||||
if (resized) {
|
||||
|
|
@ -455,7 +457,13 @@
|
|||
effects: EditorView.scrollIntoView(other, { y: 'start', yMargin: 0 })
|
||||
});
|
||||
}
|
||||
view.reconfigure({});
|
||||
// Remeasuring unchanged spacers feeds CodeMirror's own layout updates back into itself.
|
||||
if (
|
||||
resized ||
|
||||
previousSpacersA !== view.a.state.field(lineAlignment) ||
|
||||
previousSpacersB !== view.b.state.field(lineAlignment)
|
||||
)
|
||||
view.reconfigure({});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue