зеркало из https://github.com/mozilla/brackets.git
change tern query not to sort or filter the results
This commit is contained in:
Родитель
7361589145
Коммит
e4a185543f
|
@ -18,4 +18,4 @@
|
|||
url = https://github.com/eztierney/acorn
|
||||
[submodule "src/extensions/default/JavaScriptCodeHints/tern"]
|
||||
path = src/extensions/default/JavaScriptCodeHints/tern
|
||||
url = http://github.com/dloverin/tern.git
|
||||
url = http://github.com/marijnh/tern.git
|
||||
|
|
|
@ -459,7 +459,9 @@ define(function (require, exports, module) {
|
|||
query.start = offset;
|
||||
query.end = offset;
|
||||
query.file = file;
|
||||
|
||||
query.filter = false;
|
||||
query.sort = false;
|
||||
|
||||
var request = {query:query, files:[], offset:offset};
|
||||
|
||||
var state = getFileState(dir, file);
|
||||
|
@ -468,7 +470,7 @@ define(function (require, exports, module) {
|
|||
return request;
|
||||
}
|
||||
|
||||
var request = buildRequest(dir, file, "rawCompletions", offset);
|
||||
var request = buildRequest(dir, file, "completions", offset);
|
||||
var $deferredHints = $.Deferred();
|
||||
ternServer.request(request, function(error, data) {
|
||||
//if (error) return displayError(error);
|
||||
|
|
|
@ -287,7 +287,15 @@ define(function (require, exports, module) {
|
|||
token = session.getToken(cursor);
|
||||
if ((key === null) || HintUtils.hintable(token)) {
|
||||
if (token) {
|
||||
if (!cachedScope) {
|
||||
var type = session.getType(),
|
||||
query = session.getQuery();
|
||||
|
||||
// Compute fresh hints if none exist, or if the session
|
||||
// type has changed since the last hint computation
|
||||
if (!cachedScope ||
|
||||
type.property !== cachedType.property ||
|
||||
type.context !== cachedType.context) {
|
||||
console.log("compute hints");
|
||||
var offset = session.getOffset(),
|
||||
scopeResponse = ScopeManager.getScopeInfo(session, session.editor.document, offset),
|
||||
self = this;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d634953824c1a798af1d28a2daf12fa87f896715
|
||||
Subproject commit f1e5f72e071d60ae51e8627123f57182621ae47b
|
Загрузка…
Ссылка в новой задаче