Tweaked interaction with diff viewer

pull/149/head
Ruben Daniels 2015-08-24 16:05:54 -07:00 zatwierdzone przez nightwing
rodzic 1497a9b20f
commit 1e845610ed
2 zmienionych plików z 12 dodań i 10 usunięć

Wyświetl plik

@ -106,7 +106,7 @@
"c9.ide.run.build": "#4de6a0b9a4",
"c9.ide.run.debug.xdebug": "#61dcbd0180",
"c9.ide.save": "#326087f5a2",
"c9.ide.scm": "#09685145d2",
"c9.ide.scm": "#fbdb4316be",
"c9.ide.terminal.monitor": "#b52a3f2144",
"c9.ide.theme.flat": "#2de8414db7",
"c9.ide.threewaymerge": "#229382aa0b",

Wyświetl plik

@ -1266,7 +1266,7 @@ define(function(require, module, exports) {
if (XPREVIEW.test(options.path))
return;
if (previewTab && previewTab.path === options.path) {
if (!options.editorType && previewTab && previewTab.path === options.path) {
// keepPreview();
return previewTab;
}
@ -1286,8 +1286,8 @@ define(function(require, module, exports) {
}
}
if (!options.path)
throw new Error("No path specified for preview");
if (!options.path && !options.editorType)
throw new Error("No path or editorType specified for preview");
return createPreview(options, pane, callback);
}
@ -1305,17 +1305,19 @@ define(function(require, module, exports) {
}
// Else create preview pane
else if (!previewTimeout || options.immediate) {
var doc = options.document || {};
doc.meta = {
readonly: true,
preview: true
};
previewTab = open({
path: path,
editorType: options.editorType,
active: true,
pane: pane,
noanim: true,
document: {
meta: {
readonly: true,
preview: true
}
}
document: doc
}, function(err, tab) {
// Previewing has already been cancelled
if (err || !tab.loaded)