Skip to content

Commit 184134f

Browse files
committed
---
yaml --- r: 14027 b: refs/heads/try c: 4616117 h: refs/heads/master i: 14025: 78c8a5e 14023: 1b8b740 v: v3
1 parent 4ec320f commit 184134f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: da74a7f9ca774cd8addcb00a361bb230facc3b31
5+
refs/heads/try: 4616117f171d96faa6027f89f4d8697815e14566
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/comp/syntax/codemap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ fn lookup_byte_offset(cm: codemap::codemap, chpos: uint)
143143
{
144144
fn lookup(pos: file_pos) -> uint { ret pos.ch; }
145145
let {fm,line} = option::get(lookup_line(cm,chpos,lookup));
146-
let line_offset = fm.lines[line].byte;
146+
let line_offset = fm.lines[line].byte - fm.start_pos.byte;
147147
let col = chpos - fm.lines[line].ch;
148148
let col_offset = str::byte_len_range(*fm.src, line_offset, col);
149149
ret {fm: fm, pos: line_offset + col_offset};

0 commit comments

Comments
 (0)