|
|
|
@ -631,12 +631,12 @@ export const EditorUI = (props: EditorUIProps) => { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function setReducerListener() { |
|
|
|
|
if(!diffEditorRef.current && editorRef.current){ |
|
|
|
|
reducerListener(props.plugin, dispatch, monacoRef.current, [editorRef.current], props.events) |
|
|
|
|
} |
|
|
|
|
if(diffEditorRef.current && diffEditorRef.current.getModifiedEditor() && !editorRef.current){ |
|
|
|
|
reducerListener(props.plugin, dispatch, monacoRef.current, [diffEditorRef.current.getModifiedEditor()], props.events) |
|
|
|
|
} |
|
|
|
|
// if(!diffEditorRef.current && editorRef.current){
|
|
|
|
|
// reducerListener(props.plugin, dispatch, monacoRef.current, [editorRef.current], props.events)
|
|
|
|
|
// }
|
|
|
|
|
// if(diffEditorRef.current && diffEditorRef.current.getModifiedEditor() && !editorRef.current){
|
|
|
|
|
// reducerListener(props.plugin, dispatch, monacoRef.current, [diffEditorRef.current.getModifiedEditor()], props.events)
|
|
|
|
|
// }
|
|
|
|
|
if(diffEditorRef.current && diffEditorRef.current.getModifiedEditor() && editorRef.current){ |
|
|
|
|
reducerListener(props.plugin, dispatch, monacoRef.current, [diffEditorRef.current.getModifiedEditor(), editorRef.current], props.events) |
|
|
|
|
} |
|
|
|
@ -971,11 +971,11 @@ export const EditorUI = (props: EditorUIProps) => { |
|
|
|
|
original={''} |
|
|
|
|
modified={''} |
|
|
|
|
onMount={handleDiffEditorDidMount} |
|
|
|
|
beforeMount={handleEditorWillMount} |
|
|
|
|
options={{ readOnly: false, renderSideBySide: isSplit }} |
|
|
|
|
width='100%' |
|
|
|
|
height={props.isDiff ? '100%' : '0%'} |
|
|
|
|
className={props.isDiff ? "d-block" : "d-none"} |
|
|
|
|
|
|
|
|
|
/> |
|
|
|
|
<Editor |
|
|
|
|
width="100%" |
|
|
|
|