Implement Buffer::format
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
67991b413c
commit
310def2923
13 changed files with 384 additions and 53 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue