File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
js/js.parser/src/com/google/gwt/dev/js/rhino Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -236,11 +236,7 @@ String getLine() {
236
236
// Get the offset of the current character, relative to
237
237
// the line that getLine() returns.
238
238
int getOffset () {
239
- if (lineStart < 0 )
240
- // The line begins somewhere in the other buffer.
241
- return offset + (otherEnd - otherStart );
242
- else
243
- return offset - lineStart ;
239
+ return offset - lineStart ;
244
240
}
245
241
246
242
private boolean fill () throws IOException {
@@ -269,7 +265,7 @@ private boolean fill() throws IOException {
269
265
270
266
// set lineStart to a sentinel value, unless this is the first
271
267
// time around.
272
- prevStart = lineStart = (otherBuffer == null ) ? 0 : - 1 ;
268
+ prevStart = lineStart = (otherBuffer == null ) ? 0 : lineStart - end ;
273
269
274
270
offset = 0 ;
275
271
end = in .read (buffer , 0 , buffer .length );
You can’t perform that action at this time.
0 commit comments