co-authored by
Nathan Sobo
parent
67991b413c
commit
310def2923
@@ -593,6 +593,12 @@ impl Chunk {
|
||||
|
||||
if ch == '\n' {
|
||||
point.row += 1;
|
||||
if point.row > target.row {
|
||||
panic!(
|
||||
"point {:?} is beyond the end of a line with length {}",
|
||||
target, point.column
|
||||
);
|
||||
}
|
||||
point.column = 0;
|
||||
} else {
|
||||
point.column += ch.len_utf16() as u32;
|
||||
|
||||
Reference in New Issue
Block a user