mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
Merge pull request #3847 from jeffkenton/master
Use Tern jump-to-definition search for quickeditt
This commit is contained in:
commit
2245e01960
6 files changed
+95
-34
No files matched your search
@@ -403,6 +403,14 @@ define(function (require, exports, module) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} file a relative path
|
||||
* @return {string} returns the path we resolved when we tried to parse the file, or undefined
|
||||
*/
|
||||
function getResolvedPath(file) {
|
||||
return resolvedFiles[file];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Promise for the definition from TernJS, for the file & offset passed in.
|
||||
* @return {jQuery.Promise} - a promise that will resolve to definition when
|
||||
@@ -453,9 +461,8 @@ define(function (require, exports, module) {
|
||||
|
||||
var $deferredJump = getPendingRequest(file, offset, MessageIds.TERN_JUMPTODEF_MSG);
|
||||
|
||||
// pendingTernRequests[file] = null;
|
||||
|
||||
if ($deferredJump) {
|
||||
response.fullPath = getResolvedPath(response.resultFile);
|
||||
$deferredJump.resolveWith(null, [response]);
|
||||
}
|
||||
}
|
||||
@@ -624,14 +631,6 @@ define(function (require, exports, module) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} file a relative path
|
||||
* @return {string} returns the path we resolved when we tried to parse the file, or undefined
|
||||
*/
|
||||
function getResolvedPath(file) {
|
||||
return resolvedFiles[file];
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle a request from the worker for text of a file
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user