diff --git a/src/tui/mode/mini/save_as.zig b/src/tui/mode/mini/save_as.zig index 9ac78bc..3a26172 100644 --- a/src/tui/mode/mini/save_as.zig +++ b/src/tui/mode/mini/save_as.zig @@ -21,9 +21,7 @@ pub const create = Type.create; pub fn load_entries(self: *Type) !void { if (tui.current().mainview.dynamic_cast(mainview)) |mv_| if (mv_.get_editor()) |editor| { - if (editor.file_path) |old_path| - if (std.mem.lastIndexOf(u8, old_path, "/")) |pos| - try self.file_path.appendSlice(old_path[0 .. pos + 1]); + try self.file_path.appendSlice(editor.file_path orelse ""); if (editor.get_primary().selection) |sel| ret: { const text = editor.get_selection(sel, self.a) catch break :ret; defer self.a.free(text);