summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-05-02 12:02:27 +0100
committerPhil Hughes <me@iamphill.com>2018-05-02 12:02:27 +0100
commit65871813e6280b7601c0752bf07d03cf6f5638b8 (patch)
treef9020a4e36f285f2be5df37b4401e9618eb63f9e
parent6bcde61b92a401b221f0d0b956001cb94e3cd9fd (diff)
downloadgitlab-ce-65871813e6280b7601c0752bf07d03cf6f5638b8.tar.gz
dispose models when open pending tab
-rw-r--r--app/assets/javascripts/ide/stores/actions/file.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/stores/actions/file.js b/app/assets/javascripts/ide/stores/actions/file.js
index 9e3b9df90a8..b71084e850e 100644
--- a/app/assets/javascripts/ide/stores/actions/file.js
+++ b/app/assets/javascripts/ide/stores/actions/file.js
@@ -193,6 +193,8 @@ export const unstageChange = ({ commit }, path) => {
};
export const openPendingTab = ({ commit, getters, dispatch, state }, { file, keyPrefix }) => {
+ state.openFiles.forEach(f => eventHub.$emit(`editor.update.model.dispose.${f.key}`));
+
commit(types.ADD_PENDING_TAB, { file, keyPrefix });
dispatch('scrollToTab');