Index: trunk/parsers/wikidom/lib/es/es.Flow.js |
— | — | @@ -51,11 +51,13 @@ |
52 | 52 | } |
53 | 53 | |
54 | 54 | es.Flow.prototype.getLineIndex = function( offset ) { |
55 | | - for ( var i = 0; i < this.lines.length; i++ ) { |
| 55 | + var i; |
| 56 | + for ( i = 0; i < this.lines.length; i++ ) { |
56 | 57 | if ( this.lines[i].range.containsOffset( offset ) ) { |
57 | | - return i; |
| 58 | + break; |
58 | 59 | } |
59 | 60 | } |
| 61 | + return i; |
60 | 62 | }; |
61 | 63 | |
62 | 64 | /** |