Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-06 18:07:26 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-06 18:07:26 +0300
commit506159637da758f448818b834f8482238a9eb4eb (patch)
treee114c46da6c1b98451a228b7559f5a6039c5df29 /app/assets/javascripts/ide/components
parent045c0f9554a99c80d0a127540da168e272a9f977 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ide/components')
-rw-r--r--app/assets/javascripts/ide/components/repo_editor.vue15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/assets/javascripts/ide/components/repo_editor.vue b/app/assets/javascripts/ide/components/repo_editor.vue
index 08b3e8a34d6..7e2ab96d1de 100644
--- a/app/assets/javascripts/ide/components/repo_editor.vue
+++ b/app/assets/javascripts/ide/components/repo_editor.vue
@@ -32,7 +32,13 @@ export default {
...mapState('rightPane', {
rightPaneIsOpen: 'isOpen',
}),
- ...mapState(['rightPanelCollapsed', 'viewer', 'panelResizing', 'currentActivityView']),
+ ...mapState([
+ 'rightPanelCollapsed',
+ 'viewer',
+ 'panelResizing',
+ 'currentActivityView',
+ 'renderWhitespaceInCode',
+ ]),
...mapGetters([
'currentMergeRequest',
'getStagedFile',
@@ -76,6 +82,11 @@ export default {
showEditor() {
return !this.shouldHideEditor && this.isEditorViewMode;
},
+ editorOptions() {
+ return {
+ renderWhitespace: this.renderWhitespaceInCode ? 'all' : 'none',
+ };
+ },
},
watch: {
file(newVal, oldVal) {
@@ -131,7 +142,7 @@ export default {
},
mounted() {
if (!this.editor) {
- this.editor = Editor.create();
+ this.editor = Editor.create(this.editorOptions);
}
this.initEditor();
},