diff options
author | Phil Hughes <me@iamphill.com> | 2018-04-06 22:48:52 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-04-06 22:48:52 +0100 |
commit | 690c57867d6dcaaaee15208e9d4de6ec85f19e80 (patch) | |
tree | 879d1ec2b90cff2e0c9dc65e4e82b7bcfe5b8511 /app/assets/javascripts/ide/stores/mutations | |
parent | 2b53f6cfa7675b127cf1c88a15de95ef02c7cbbf (diff) | |
download | gitlab-ce-690c57867d6dcaaaee15208e9d4de6ec85f19e80.tar.gz |
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.js | 6 |
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); |