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