feat(buffers): move buffer lifetime management to new Buffer.Manager module
This commit is contained in:
parent
fbeaefe7ff
commit
aa1e0674cc
6 changed files with 109 additions and 48 deletions
|
@ -11,7 +11,6 @@ pub const create = Type.create;
|
|||
|
||||
pub fn load_entries(self: *Type) error{ Exit, OutOfMemory }!void {
|
||||
const editor = tui.get_active_editor() orelse return;
|
||||
if (editor.is_dirty()) return tp.exit("unsaved changes");
|
||||
if (editor.file_path) |old_path|
|
||||
if (std.mem.lastIndexOf(u8, old_path, "/")) |pos|
|
||||
try self.file_path.appendSlice(old_path[0 .. pos + 1]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue