fix: memory leaks in operations that call cut_selection or cut_to
This commit is contained in:
parent
06788c4243
commit
b7343219c1
2 changed files with 29 additions and 21 deletions
|
|
@ -306,7 +306,7 @@ const cmds_ = struct {
|
|||
const mv = tui.mainview() orelse return;
|
||||
const ed = mv.get_active_editor() orelse return;
|
||||
const b = try ed.buf_for_update();
|
||||
const text, const root = try ed.cut_to(move_noop, b.root);
|
||||
const text, const root = try ed.cut_to(move_noop, b.root, ed.allocator);
|
||||
ed.set_clipboard_internal(text);
|
||||
try ed.update_buf(root);
|
||||
ed.clamp();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue