Commit c463cfd9 authored by Phil Hughes's avatar Phil Hughes

disable scroll past end for diff editor

hide diff overview in diff editor
parent bbd52bc7
......@@ -706,3 +706,7 @@
.ide-commit-new-branch {
margin-left: 25px;
}
.ide-editor-diff {
margin-right: -30px;
}
......@@ -20,6 +20,9 @@ export default {
shouldHideEditor() {
return this.activeFile && this.activeFile.binary && !this.activeFile.raw;
},
ideClassName() {
return `ide-editor-${this.viewer}`;
},
},
watch: {
activeFile(oldVal, newVal) {
......@@ -138,6 +141,7 @@ export default {
<div
id="ide"
class="blob-viewer-container blob-editor-container"
:class="ideClassName"
>
<div
v-if="shouldHideEditor"
......
......@@ -70,6 +70,7 @@ export default class Editor {
this.disposable.add(
this.instance = this.monaco.editor.createDiffEditor(domElement, {
readOnly: true,
scrollBeyondLastLine: false,
}),
);
......
......@@ -66,6 +66,7 @@ describe('Multi-file editor library', () => {
expect(instance.monaco.editor.createDiffEditor).toHaveBeenCalledWith(holder, {
readOnly: true,
scrollBeyondLastLine: false,
});
});
});
......
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