Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
fb5f908d
Commit
fb5f908d
authored
Mar 26, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable word wrap in IDE
Closes #44303
parent
1d7ca033
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
24 deletions
+17
-24
app/assets/javascripts/ide/lib/editor_options.js
app/assets/javascripts/ide/lib/editor_options.js
+1
-0
spec/javascripts/ide/lib/editor_spec.js
spec/javascripts/ide/lib/editor_spec.js
+16
-24
No files found.
app/assets/javascripts/ide/lib/editor_options.js
View file @
fb5f908d
...
...
@@ -6,6 +6,7 @@ export const defaultEditorOptions = {
minimap
:
{
enabled
:
false
,
},
wordWrap
:
'
bounded
'
,
};
export
default
[
...
...
spec/javascripts/ide/lib/editor_spec.js
View file @
fb5f908d
...
...
@@ -64,22 +64,20 @@ describe('Multi-file editor library', () => {
instance
.
createDiffInstance
(
holder
);
expect
(
instance
.
monaco
.
editor
.
createDiffEditor
).
toHaveBeenCalledWith
(
holder
,
{
model
:
null
,
contextmenu
:
true
,
minimap
:
{
enabled
:
false
,
},
readOnly
:
true
,
scrollBeyondLastLine
:
false
,
quickSuggestions
:
false
,
occurrencesHighlight
:
false
,
renderLineHighlight
:
'
none
'
,
hideCursorInOverviewRuler
:
true
,
expect
(
instance
.
monaco
.
editor
.
createDiffEditor
).
toHaveBeenCalledWith
(
holder
,
{
model
:
null
,
contextmenu
:
true
,
minimap
:
{
enabled
:
false
,
},
);
readOnly
:
true
,
scrollBeyondLastLine
:
false
,
quickSuggestions
:
false
,
occurrencesHighlight
:
false
,
renderLineHighlight
:
'
none
'
,
hideCursorInOverviewRuler
:
true
,
wordWrap
:
'
bounded
'
,
});
});
});
...
...
@@ -117,9 +115,7 @@ describe('Multi-file editor library', () => {
});
it
(
'
sets original & modified when diff editor
'
,
()
=>
{
spyOn
(
instance
.
instance
,
'
getEditorType
'
).
and
.
returnValue
(
'
vs.editor.IDiffEditor
'
,
);
spyOn
(
instance
.
instance
,
'
getEditorType
'
).
and
.
returnValue
(
'
vs.editor.IDiffEditor
'
);
spyOn
(
instance
.
instance
,
'
setModel
'
);
instance
.
attachModel
(
model
);
...
...
@@ -135,9 +131,7 @@ describe('Multi-file editor library', () => {
instance
.
attachModel
(
model
);
expect
(
instance
.
dirtyDiffController
.
attachModel
).
toHaveBeenCalledWith
(
model
,
);
expect
(
instance
.
dirtyDiffController
.
attachModel
).
toHaveBeenCalledWith
(
model
);
});
it
(
'
re-decorates with the dirty diff controller
'
,
()
=>
{
...
...
@@ -145,9 +139,7 @@ describe('Multi-file editor library', () => {
instance
.
attachModel
(
model
);
expect
(
instance
.
dirtyDiffController
.
reDecorate
).
toHaveBeenCalledWith
(
model
,
);
expect
(
instance
.
dirtyDiffController
.
reDecorate
).
toHaveBeenCalledWith
(
model
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment