diff options
| author | Ariel Davis <ariel.z.davis@icloud.com> | 2023-05-06 01:02:37 -0700 |
|---|---|---|
| committer | Ariel Davis <ariel.z.davis@icloud.com> | 2023-05-06 01:02:37 -0700 |
| commit | 8012acc90e6d6ba0e59bb0513dc419a3aa4739bb (patch) | |
| tree | aff3a46b8764e9fd18b36de3f5a1f52596f2ef74 /lib | |
| parent | 84a6cb3bfc98ec9692eb82a8e2016d69d95b3209 (diff) | |
| download | rust-8012acc90e6d6ba0e59bb0513dc419a3aa4739bb.tar.gz rust-8012acc90e6d6ba0e59bb0513dc419a3aa4739bb.zip | |
Use a from
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/line-index/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/line-index/src/lib.rs b/lib/line-index/src/lib.rs index eecc1edb135..26287212e31 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, |
