fix: simplify Buffer.del_chars to use only byte offsets
This is a much faster implementation avoids duplicating work done by Buffer.get_range. Buffer.get_range also does not have the bug reported in #83. The test case was also updated to reflect that get_chars now uses bytes, instead of columns. closes #83
This commit is contained in:
parent
5d5b157295
commit
f134fdb747
2 changed files with 40 additions and 43 deletions
|
@ -292,7 +292,7 @@ test "del_chars_with_tab_issue83" {
|
|||
defer a.free(line3);
|
||||
defer a.free(line4);
|
||||
break :blk line2.len + 1 +
|
||||
line3.len + 7 + 1 +
|
||||
line3.len + 1 +
|
||||
line4.len + 1;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue