Fix problem with finding next token on next line.

Don't set the selection until we have done the final jump-to-def
should address comments in issue #3863
This commit is contained in:
Erik Tierney committed 2013-06-20 10:36:40 -04:00
1 parent c8284ffbc4
commit 35821e69db
3 files changed
+16 -11

No files matched your search

@@ -218,14 +218,15 @@ define(function (require, exports, module) {
doc = this.editor.document;
do {
if (next.start > cursor.ch) {
if (next.end > cursor.ch) {
cursor.ch = next.end;
} else if (next.end > 0) {
} else if (next.end < doc.getLine(cursor.line).length) {
cursor.ch = next.end + 1;
} else if (cursor.line > 0) {
cursor.ch = doc.getLine(cursor.line + 1).length;
} else if (doc.getLine(cursor.line + 1)) {
cursor.ch = 0;
cursor.line++;
} else {
next = null;
break;
}
next = this.getToken(cursor);