kopia lustrzana https://github.com/c9/core
commit
32f53cebc2
|
@ -258,7 +258,7 @@ define(function(require, exports, module) {
|
||||||
};
|
};
|
||||||
e.confirm = function () {
|
e.confirm = function () {
|
||||||
if (node.status === "predicted")
|
if (node.status === "predicted")
|
||||||
node.status = "pending";
|
node.status = isFolder ? "pending" : "loaded";
|
||||||
};
|
};
|
||||||
node.status = "predicted";
|
node.status = "predicted";
|
||||||
}
|
}
|
||||||
|
|
|
@ -521,20 +521,15 @@ define(function(require, exports, module) {
|
||||||
cb = undefined; // called from libsearch
|
cb = undefined; // called from libsearch
|
||||||
options = options || getOptions();
|
options = options || getOptions();
|
||||||
|
|
||||||
// Open Console
|
|
||||||
if (chkSFConsole.checked)
|
|
||||||
c9console.show();
|
|
||||||
|
|
||||||
makeSearchResultsPanel(function(err, tab) {
|
makeSearchResultsPanel(function(err, tab) {
|
||||||
if (err) {
|
if (err)
|
||||||
c9console.error("Error creating search panel");
|
return console.error("Error creating search panel");
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var session = tab.document.getSession();
|
var session = tab.document.getSession();
|
||||||
var acesession = session.session;
|
var acesession = session.session;
|
||||||
var doc = acesession.getDocument();
|
var doc = acesession.getDocument();
|
||||||
|
|
||||||
|
acesession.mergeUndoDeltas = false;
|
||||||
if (settings.getBool("user/findinfiles/@clear"))
|
if (settings.getBool("user/findinfiles/@clear"))
|
||||||
doc.setValue("");
|
doc.setValue("");
|
||||||
|
|
||||||
|
@ -604,6 +599,7 @@ define(function(require, exports, module) {
|
||||||
}
|
}
|
||||||
find.findFiles(options, function(err, stream, process) {
|
find.findFiles(options, function(err, stream, process) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
acesession.mergeUndoDeltas = true;
|
||||||
appendLines(doc, "Error executing search: " + err.message);
|
appendLines(doc, "Error executing search: " + err.message);
|
||||||
tab.classList.remove("loading");
|
tab.classList.remove("loading");
|
||||||
tab.classList.add("error");
|
tab.classList.add("error");
|
||||||
|
@ -619,6 +615,7 @@ define(function(require, exports, module) {
|
||||||
doc.ace.scrollToLine(currLength, false, true);
|
doc.ace.scrollToLine(currLength, false, true);
|
||||||
firstRun = false;
|
firstRun = false;
|
||||||
}
|
}
|
||||||
|
acesession.mergeUndoDeltas = true;
|
||||||
appendLines(doc,
|
appendLines(doc,
|
||||||
reBase ? chunk.replace(reBase, "") : chunk);
|
reBase ? chunk.replace(reBase, "") : chunk);
|
||||||
});
|
});
|
||||||
|
@ -634,6 +631,7 @@ define(function(require, exports, module) {
|
||||||
var line = doc.getLine(endRow - i);
|
var line = doc.getLine(endRow - i);
|
||||||
if (line && /Found \d+/.test(line)) {
|
if (line && /Found \d+/.test(line)) {
|
||||||
var headerRow = doc.lastHeaderRow;
|
var headerRow = doc.lastHeaderRow;
|
||||||
|
acesession.mergeUndoDeltas = true;
|
||||||
doc.insertInLine({
|
doc.insertInLine({
|
||||||
row: headerRow,
|
row: headerRow,
|
||||||
column: doc.getLine(headerRow).length
|
column: doc.getLine(headerRow).length
|
||||||
|
@ -822,13 +820,12 @@ define(function(require, exports, module) {
|
||||||
return /.*/.exec(str)[0];
|
return /.*/.exec(str)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
var searchPanel = {};
|
|
||||||
function makeSearchResultsPanel(callback) {
|
function makeSearchResultsPanel(callback) {
|
||||||
var tab = searchPanel[chkSFConsole.checked];
|
var tab = tabs.findTab("/.c9/searchresults");
|
||||||
|
|
||||||
if (!tab || !tab.loaded) {
|
if (!tab) {
|
||||||
var root = chkSFConsole.checked ? c9console : tabs;
|
var root = chkSFConsole.checked ? c9console : tabs;
|
||||||
searchPanel[chkSFConsole.checked] = root.open({
|
root.open({
|
||||||
path: "/.c9/searchresults", // This allows the tab to be saved
|
path: "/.c9/searchresults", // This allows the tab to be saved
|
||||||
focus: true,
|
focus: true,
|
||||||
document: {
|
document: {
|
||||||
|
|
Ładowanie…
Reference in New Issue