fix: do not insert EOL CR chars in Buffer.insert_chars
This commit is contained in:
parent
371dcaeeb1
commit
7cda28adde
1 changed files with 1 additions and 0 deletions
|
|
@ -947,6 +947,7 @@ const Node = union(enum) {
|
|||
while (rest.len > 0) {
|
||||
if (std.mem.indexOfScalar(u8, rest, '\n')) |eol| {
|
||||
chunk = rest[0..eol];
|
||||
chunk = if (chunk.len > 0 and chunk[chunk.len - 1] == '\r') chunk[0 .. chunk.len - 1] else chunk;
|
||||
rest = rest[eol + 1 ..];
|
||||
need_eol = true;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue