diff options
Diffstat (limited to 'crates/typst-ide/src/tests.rs')
| -rw-r--r-- | crates/typst-ide/src/tests.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/typst-ide/src/tests.rs b/crates/typst-ide/src/tests.rs index c6d733ca..1176e460 100644 --- a/crates/typst-ide/src/tests.rs +++ b/crates/typst-ide/src/tests.rs @@ -228,7 +228,7 @@ impl FilePos for (&str, isize) { #[track_caller] fn cursor(source: &Source, cursor: isize) -> usize { if cursor < 0 { - source.len_bytes().checked_add_signed(cursor + 1).unwrap() + source.text().len().checked_add_signed(cursor + 1).unwrap() } else { cursor as usize } |
