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
Jérome Perrin
gitlab-ce
Commits
cc066314
Commit
cc066314
authored
May 09, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed empty editors in the IDE
Closes #46153
parent
9a54cb36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
app/assets/javascripts/ide/lib/common/model.js
app/assets/javascripts/ide/lib/common/model.js
+3
-3
app/assets/javascripts/ide/stores/actions/file.js
app/assets/javascripts/ide/stores/actions/file.js
+2
-0
No files found.
app/assets/javascripts/ide/lib/common/model.js
View file @
cc066314
...
...
@@ -14,12 +14,12 @@ export default class Model {
(
this
.
originalModel
=
this
.
monaco
.
editor
.
createModel
(
head
?
head
.
content
:
this
.
file
.
raw
,
undefined
,
new
this
.
monaco
.
Uri
(
null
,
null
,
`original/
${
this
.
file
.
key
}
`
),
new
this
.
monaco
.
Uri
(
null
,
null
,
`original/
${
this
.
path
}
`
),
)),
(
this
.
model
=
this
.
monaco
.
editor
.
createModel
(
this
.
content
,
undefined
,
new
this
.
monaco
.
Uri
(
null
,
null
,
this
.
file
.
key
),
new
this
.
monaco
.
Uri
(
null
,
null
,
this
.
path
),
)),
);
if
(
this
.
file
.
mrChange
)
{
...
...
@@ -27,7 +27,7 @@ export default class Model {
(
this
.
baseModel
=
this
.
monaco
.
editor
.
createModel
(
this
.
file
.
baseRaw
,
undefined
,
new
this
.
monaco
.
Uri
(
null
,
null
,
`target/
${
this
.
file
.
path
}
`
),
new
this
.
monaco
.
Uri
(
null
,
null
,
`target/
${
this
.
path
}
`
),
)),
);
}
...
...
app/assets/javascripts/ide/stores/actions/file.js
View file @
cc066314
...
...
@@ -196,6 +196,8 @@ export const unstageChange = ({ commit }, path) => {
};
export
const
openPendingTab
=
({
commit
,
getters
,
dispatch
,
state
},
{
file
,
keyPrefix
})
=>
{
if
(
getters
.
activeFile
&&
getters
.
activeFile
.
key
===
`
${
keyPrefix
}
-
${
file
.
key
}
`
)
return
false
;
state
.
openFiles
.
forEach
(
f
=>
eventHub
.
$emit
(
`editor.update.model.dispose.
${
f
.
key
}
`
));
commit
(
types
.
ADD_PENDING_TAB
,
{
file
,
keyPrefix
});
...
...
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