This commit is contained in:
ef3d0c3e 2024-12-01 09:57:34 +01:00
parent 347fd6ce59
commit decac73fec
2 changed files with 2 additions and 2 deletions

View file

@ -130,7 +130,7 @@ impl RuleState for CustomStyleState {
.map(|last| { .map(|last| {
( (
last.location().source(), last.location().source(),
last.location().end() - 1..last.location().end(), last.location().end_offset(1)..last.location().end(),
) )
}) })
.unwrap(); .unwrap();

View file

@ -407,7 +407,7 @@ impl<'a> Semantics<'a> {
let len = usize::min(range.end - cursor.pos, end); let len = usize::min(range.end - cursor.pos, end);
let clen = self.source.content()[cursor.pos..cursor.pos + len] let clen = self.source.content()[cursor.pos..cursor.pos + len]
.chars() .chars()
.fold(0, |acc, _| acc + 1); .fold(0, |acc, c| acc + c.len_utf16());
let delta_line = cursor.line - current.line; let delta_line = cursor.line - current.line;
let delta_start = if delta_line == 0 { let delta_start = if delta_line == 0 {