mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-01 22:12:04 +03:00
Update CodeViewer to use internal API for completions
- Update CodeViewer component to call `mergeView?.destroy()` before recreating the merge view - Add a function to update the two editors when values change [src/lib/components/CodeViewer.svelte] - Remove commented out code - Update code to call `mergeView?.destroy()` before recreating the merge view - Add a function to update the two editors when the values change
This commit is contained in:
parent
29e76aa24c
commit
cf34f525bb
@ -14,19 +14,13 @@
|
||||
onMount(() => (mergeView = create_merge_view(value, newValue)));
|
||||
onDestroy(() => mergeView?.destroy());
|
||||
|
||||
// $: mergeView && update(value, newValue);
|
||||
$: mergeView && update(value, newValue);
|
||||
|
||||
// function update(a: string | null | undefined, b: string | null | undefined): void {
|
||||
// mergeView.a.setState(create_editor_state(a));
|
||||
// mergeView.reconfigure({
|
||||
// collapseUnchanged: { margin: 3, minSize: 3 },
|
||||
// })
|
||||
// view.setState(create_editor_state(value));
|
||||
// mer
|
||||
// mergeView.setA(create_editor_state(value));
|
||||
// mergeView.setB(create_editor_state(value));
|
||||
// TODO
|
||||
// }
|
||||
// There may be a more graceful way to update the two editors
|
||||
function update(a: string, b: string): void {
|
||||
mergeView?.destroy()
|
||||
mergeView = create_merge_view(a, b)
|
||||
}
|
||||
|
||||
function create_editor_state(
|
||||
value: string | null | undefined
|
||||
|
Loading…
Reference in New Issue
Block a user