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