Added the ability to turn off worker-based hinting.
This commit is contained in:
parent
2e87c78cde
commit
c8cf1fd610
2 changed files with 16 additions and 9 deletions
|
@ -5,7 +5,7 @@ these files from the menu, then save it, it'll be dropped into Chrome's
|
|||
synchronized storage, which means that (theoretically) all your computers will
|
||||
get a copy.
|
||||
|
||||
Unfortunately, it's not (yet) feasible to merge configuration the way that
|
||||
Unfortunately, it's not (yet) possible to merge configuration the way that
|
||||
Sublime does, which means that this won't behave exactly like you may expect.
|
||||
If new options are introduced, you'll need to copy your settings to a new
|
||||
file, reset Caret's config to the defaults from the menu, then copy your
|
||||
|
@ -17,5 +17,6 @@ configuration changes back over. Sorry about that. I'm working on it.
|
|||
"indentation": 2,
|
||||
"wordWrap": true,
|
||||
"fontFamily": "", //WARNING: only fixed-width fonts are currently supported
|
||||
"fontSize": 13
|
||||
"fontSize": 13,
|
||||
"useWorker": true
|
||||
}
|
|
@ -28,7 +28,7 @@ define([
|
|||
session.retain();
|
||||
session.setUnmodified();
|
||||
return;
|
||||
};
|
||||
}
|
||||
session.isTab = true;
|
||||
|
||||
session.setUndoManager(new ace.UndoManager());
|
||||
|
@ -89,6 +89,7 @@ define([
|
|||
var id = this.file.retain();
|
||||
if (!id) return;
|
||||
chrome.storage.local.get("retained", function(data) {
|
||||
if (!data.retained) return;
|
||||
var filtered = data.retained.filter(function(item) { return item != id });
|
||||
chrome.storage.local.set({ retained: filtered });
|
||||
});
|
||||
|
@ -132,6 +133,7 @@ define([
|
|||
var setTabSyntax = function(tab) {
|
||||
tab.setTabSize(userConfig.indentation || 2);
|
||||
tab.setUseWrapMode(userConfig.wordWrap);
|
||||
tab.setUseWorker(userConfig.useWorker);
|
||||
var syntaxValue = "plain_text";
|
||||
if (tab.file) {
|
||||
var found = false;
|
||||
|
@ -189,7 +191,7 @@ define([
|
|||
next = 0;
|
||||
}
|
||||
raiseTab(next);
|
||||
}
|
||||
};
|
||||
|
||||
if (tab.modified) {
|
||||
dialog(
|
||||
|
@ -200,7 +202,7 @@ define([
|
|||
tab.save();
|
||||
}
|
||||
continuation();
|
||||
})
|
||||
});
|
||||
} else {
|
||||
continuation();
|
||||
}
|
||||
|
@ -220,7 +222,7 @@ define([
|
|||
shifted = tabs.length + shifted;
|
||||
}
|
||||
raiseTab(shifted);
|
||||
}
|
||||
};
|
||||
|
||||
var openFile = function() {
|
||||
var f = new File();
|
||||
|
@ -238,10 +240,10 @@ define([
|
|||
f.entry = file.entry;
|
||||
f.read(function(err, contents) {
|
||||
addTab(contents, f);
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var syntax = document.find(".syntax");
|
||||
|
||||
|
@ -276,6 +278,7 @@ define([
|
|||
//after a reasonable delay, filter failures out of retention
|
||||
setTimeout(function() {
|
||||
chrome.storage.local.get("retained", function(data) {
|
||||
if (!data.retained) return;
|
||||
chrome.storage.local.set({
|
||||
retained: data.retained.filter(function(d) { return failures.indexOf(d) == -1 })
|
||||
});
|
||||
|
@ -287,6 +290,9 @@ define([
|
|||
var reset = function() {
|
||||
cfg = Settings.get("ace");
|
||||
userConfig = Settings.get("user");
|
||||
tabs.forEach(function(tab) {
|
||||
setTabSyntax(tab);
|
||||
})
|
||||
};
|
||||
|
||||
command.on("init:startup", init);
|
||||
|
|
Loading…
Reference in a new issue