Skip to content

Commit 6500487

Browse files
committed
Rename
1 parent 0ad2450 commit 6500487

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/line-index/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ impl LineIndex {
148148
/// e.g. if it points to the middle of a multi-byte character.
149149
pub fn try_line_col(&self, offset: TextSize) -> Option<LineCol> {
150150
let line = self.newlines.partition_point(|&it| it <= offset).checked_sub(1)?;
151-
let line_start_offset = self.newlines.get(line)?;
152-
let col = offset - line_start_offset;
151+
let start = self.newlines.get(line)?;
152+
let col = offset - start;
153153
let ret = LineCol { line: line as u32, col: col.into() };
154154
self.line_wide_chars
155155
.get(&ret.line)

0 commit comments

Comments
 (0)