Commit b40e2c7d authored by Phil Hughes's avatar Phil Hughes

remove hacky margin added to hide diff overview

added comment re. try/catch in dispose
parent c463cfd9
......@@ -706,7 +706,3 @@
.ide-commit-new-branch {
margin-left: 25px;
}
.ide-editor-diff {
margin-right: -30px;
}
......@@ -20,9 +20,6 @@ export default {
shouldHideEditor() {
return this.activeFile && this.activeFile.binary && !this.activeFile.raw;
},
ideClassName() {
return `ide-editor-${this.viewer}`;
},
},
watch: {
activeFile(oldVal, newVal) {
......@@ -141,7 +138,6 @@ export default {
<div
id="ide"
class="blob-viewer-container blob-editor-container"
:class="ideClassName"
>
<div
v-if="shouldHideEditor"
......
......@@ -124,20 +124,16 @@ export default class Editor {
dispose() {
window.removeEventListener('resize', this.debouncedUpdate);
// catch any potential errors with disposing the error
// this is mainly for tests caused by elements not existing
try {
this.disposable.dispose();
// dispose main monaco instance
if (this.instance) {
this.instance = null;
}
} catch (e) {
// dispose main monaco instance
if (this.instance) {
this.instance = null;
}
}
}
updateDimensions() {
this.instance.layout();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment