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:
Diffstat (limited to 'app/assets/javascripts/ide/components/repo_editor.vue')
-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();
},