mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
fix hinting on non-ascii characters
This commit is contained in:
1 parent
03992b9198
commit
8642920d8c
7 files changed
+144
-75
No files matched your search
@@ -203,16 +203,23 @@ define(function (require, exports, module) {
|
||||
Session.prototype.getQuery = function () {
|
||||
var cursor = this.getCursor(),
|
||||
token = this.getToken(cursor),
|
||||
query = "";
|
||||
|
||||
query = "",
|
||||
start = cursor.ch,
|
||||
end = start;
|
||||
|
||||
if (token) {
|
||||
// If the token string is not an identifier, then the query string
|
||||
// is empty.
|
||||
if (HintUtils.maybeIdentifier(token.string)) {
|
||||
query = token.string.substring(0, token.string.length - (token.end - cursor.ch));
|
||||
query = query.trim();
|
||||
var line = this.getLine(cursor.line);
|
||||
while (start > 0) {
|
||||
if (HintUtils.maybeIdentifier(line[start - 1])) {
|
||||
start--;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
query = line.substring(start, end);
|
||||
}
|
||||
|
||||
return query;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user