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