Unnamed repository; edit this file 'description' to name the repository.
Use a from
Ariel Davis 2023-05-06
parent 84a6cb3 · commit 8012acc
-rw-r--r--lib/line-index/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/line-index/src/lib.rs b/lib/line-index/src/lib.rs
index eecc1edb13..26287212e3 100644
--- a/lib/line-index/src/lib.rs
+++ b/lib/line-index/src/lib.rs
@@ -161,7 +161,7 @@ impl LineIndex {
let mut res: usize = col.into();
if let Some(wide_chars) = self.line_wide_chars.get(&line_col.line) {
for c in wide_chars.iter() {
- if c.end <= col {
+ if u32::from(c.end) <= line_col.col {
res -= usize::from(c.len()) - c.wide_len(enc);
} else {
// From here on, all utf16 characters come *after* the character we are mapping,