Make merge tool work when switching editors

pull/223/head
Ruben Daniels 2015-10-21 21:12:27 +00:00
rodzic c7f5b63e51
commit a2bfeb4932
2 zmienionych plików z 14 dodań i 2 usunięć

Wyświetl plik

@ -106,7 +106,7 @@
"c9.ide.run.build": "#0598fff697",
"c9.ide.run.debug.xdebug": "#61dcbd0180",
"c9.ide.save": "#4a4a60a004",
"c9.ide.scm": "#d92bb9aeb5",
"c9.ide.scm": "#a194f3ca85",
"c9.ide.terminal.monitor": "#b76f1c9f24",
"c9.ide.test": "#ba0ed6e586",
"c9.ide.test.mocha": "#f6cc482886",

Wyświetl plik

@ -178,7 +178,7 @@ define(function(require, module, exports) {
if (!editors.findEditor(e.value).fileExtensions.length)
openEditor(e.value, true, function(){});
else if (focussedTab)
focussedTab.switchEditor(e.value, function(){});
switchEditor(focussedTab, e.value, function(){});
});
editors.on("menuShow", function(e) {
var group, editor = focussedTab && focussedTab.editor;
@ -1405,6 +1405,13 @@ define(function(require, module, exports) {
return true;
}
function switchEditor(tab, type, callback) {
tab.switchEditor(type, function(){
emit("switchEditor", { tab: tab });
callback.apply(this, arguments);
});
}
/**** Support for state preservation ****/
function pauseTabResize(){
@ -1956,6 +1963,11 @@ define(function(require, module, exports) {
*/
clone: clone,
/**
*
*/
switchEditor: switchEditor,
/**
* @ignore
*/