kopia lustrzana https://github.com/c9/core
Tweaked interaction with diff viewer
rodzic
1497a9b20f
commit
1e845610ed
|
@ -106,7 +106,7 @@
|
||||||
"c9.ide.run.build": "#4de6a0b9a4",
|
"c9.ide.run.build": "#4de6a0b9a4",
|
||||||
"c9.ide.run.debug.xdebug": "#61dcbd0180",
|
"c9.ide.run.debug.xdebug": "#61dcbd0180",
|
||||||
"c9.ide.save": "#326087f5a2",
|
"c9.ide.save": "#326087f5a2",
|
||||||
"c9.ide.scm": "#09685145d2",
|
"c9.ide.scm": "#fbdb4316be",
|
||||||
"c9.ide.terminal.monitor": "#b52a3f2144",
|
"c9.ide.terminal.monitor": "#b52a3f2144",
|
||||||
"c9.ide.theme.flat": "#2de8414db7",
|
"c9.ide.theme.flat": "#2de8414db7",
|
||||||
"c9.ide.threewaymerge": "#229382aa0b",
|
"c9.ide.threewaymerge": "#229382aa0b",
|
||||||
|
|
|
@ -1266,7 +1266,7 @@ define(function(require, module, exports) {
|
||||||
if (XPREVIEW.test(options.path))
|
if (XPREVIEW.test(options.path))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (previewTab && previewTab.path === options.path) {
|
if (!options.editorType && previewTab && previewTab.path === options.path) {
|
||||||
// keepPreview();
|
// keepPreview();
|
||||||
return previewTab;
|
return previewTab;
|
||||||
}
|
}
|
||||||
|
@ -1286,8 +1286,8 @@ define(function(require, module, exports) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!options.path)
|
if (!options.path && !options.editorType)
|
||||||
throw new Error("No path specified for preview");
|
throw new Error("No path or editorType specified for preview");
|
||||||
|
|
||||||
return createPreview(options, pane, callback);
|
return createPreview(options, pane, callback);
|
||||||
}
|
}
|
||||||
|
@ -1305,17 +1305,19 @@ define(function(require, module, exports) {
|
||||||
}
|
}
|
||||||
// Else create preview pane
|
// Else create preview pane
|
||||||
else if (!previewTimeout || options.immediate) {
|
else if (!previewTimeout || options.immediate) {
|
||||||
|
var doc = options.document || {};
|
||||||
|
doc.meta = {
|
||||||
|
readonly: true,
|
||||||
|
preview: true
|
||||||
|
};
|
||||||
|
|
||||||
previewTab = open({
|
previewTab = open({
|
||||||
path: path,
|
path: path,
|
||||||
|
editorType: options.editorType,
|
||||||
active: true,
|
active: true,
|
||||||
pane: pane,
|
pane: pane,
|
||||||
noanim: true,
|
noanim: true,
|
||||||
document: {
|
document: doc
|
||||||
meta: {
|
|
||||||
readonly: true,
|
|
||||||
preview: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, function(err, tab) {
|
}, function(err, tab) {
|
||||||
// Previewing has already been cancelled
|
// Previewing has already been cancelled
|
||||||
if (err || !tab.loaded)
|
if (err || !tab.loaded)
|
||||||
|
|
Ładowanie…
Reference in New Issue