Compare commits
No commits in common. "06788c4243568021becc11db1b6e62e752b90478" and "25a719382f2ef90d84d44e0c014f056285267a03" have entirely different histories.
06788c4243
...
25a719382f
2 changed files with 10 additions and 18 deletions
|
|
@ -34,7 +34,6 @@ pub fn name(_: *Type) []const u8 {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn select(self: *Type) void {
|
pub fn select(self: *Type) void {
|
||||||
{
|
|
||||||
var buf: std.ArrayList(u8) = .empty;
|
var buf: std.ArrayList(u8) = .empty;
|
||||||
defer buf.deinit(self.allocator);
|
defer buf.deinit(self.allocator);
|
||||||
const file_path = project_manager.expand_home(self.allocator, &buf, self.file_path.items);
|
const file_path = project_manager.expand_home(self.allocator, &buf, self.file_path.items);
|
||||||
|
|
@ -42,6 +41,5 @@ pub fn select(self: *Type) void {
|
||||||
tp.self_pid().send(.{ "cmd", "change_project", .{file_path} }) catch {}
|
tp.self_pid().send(.{ "cmd", "change_project", .{file_path} }) catch {}
|
||||||
else if (file_path.len > 0)
|
else if (file_path.len > 0)
|
||||||
tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_path } }) catch {};
|
tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_path } }) catch {};
|
||||||
}
|
|
||||||
command.executeName("exit_mini_mode", .{}) catch {};
|
command.executeName("exit_mini_mode", .{}) catch {};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ const std = @import("std");
|
||||||
const tp = @import("thespian");
|
const tp = @import("thespian");
|
||||||
const root = @import("soft_root").root;
|
const root = @import("soft_root").root;
|
||||||
const command = @import("command");
|
const command = @import("command");
|
||||||
const project_manager = @import("project_manager");
|
|
||||||
|
|
||||||
const tui = @import("../../tui.zig");
|
const tui = @import("../../tui.zig");
|
||||||
|
|
||||||
|
|
@ -27,13 +26,8 @@ pub fn name(_: *Type) []const u8 {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn select(self: *Type) void {
|
pub fn select(self: *Type) void {
|
||||||
{
|
if (root.is_directory(self.file_path.items)) return;
|
||||||
var buf: std.ArrayList(u8) = .empty;
|
if (self.file_path.items.len > 0)
|
||||||
defer buf.deinit(self.allocator);
|
tp.self_pid().send(.{ "cmd", "save_file_as", .{self.file_path.items} }) catch {};
|
||||||
const file_path = project_manager.expand_home(self.allocator, &buf, self.file_path.items);
|
|
||||||
if (root.is_directory(file_path)) return;
|
|
||||||
if (file_path.len > 0)
|
|
||||||
tp.self_pid().send(.{ "cmd", "save_file_as", .{file_path} }) catch {};
|
|
||||||
}
|
|
||||||
command.executeName("exit_mini_mode", .{}) catch {};
|
command.executeName("exit_mini_mode", .{}) catch {};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue