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:
authorPhil Hughes <me@iamphill.com>2018-04-07 00:48:52 +0300
committerPhil Hughes <me@iamphill.com>2018-04-07 00:48:52 +0300
commit690c57867d6dcaaaee15208e9d4de6ec85f19e80 (patch)
tree879d1ec2b90cff2e0c9dc65e4e82b7bcfe5b8511 /app/assets/javascripts/ide/stores/mutations
parent2b53f6cfa7675b127cf1c88a15de95ef02c7cbbf (diff)
added ability to have `head` file to compare against
fixed files getting into an opened & active state when it shouldnt
Diffstat (limited to 'app/assets/javascripts/ide/stores/mutations')
-rw-r--r--app/assets/javascripts/ide/stores/mutations/file.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/ide/stores/mutations/file.js b/app/assets/javascripts/ide/stores/mutations/file.js
index 7eccc2c82cf..3ee352309d4 100644
--- a/app/assets/javascripts/ide/stores/mutations/file.js
+++ b/app/assets/javascripts/ide/stores/mutations/file.js
@@ -132,6 +132,8 @@ export default {
Object.assign(state.entries[path], {
...stagedFile,
key: state.entries[path].key,
+ active: state.entries[path].active,
+ opened: state.entries[path].opened,
changed: true,
});
@@ -157,9 +159,7 @@ export default {
[types.ADD_PENDING_TAB](state, { file, keyPrefix = 'pending' }) {
const key = `${keyPrefix}-${file.key}`;
const pendingTab = state.openFiles.find(f => f.key === key && f.pending);
- let openFiles = state.openFiles.map(f =>
- Object.assign(f, { active: f.key === key, opened: false }),
- );
+ let openFiles = state.openFiles.map(f => Object.assign(f, { active: false, opened: false }));
if (!pendingTab) {
const openFile = openFiles.find(f => f.path === file.path);