refactor: clean-up some unused stuff
This commit is contained in:
parent
6029c705e6
commit
0992f08a94
3 changed files with 4 additions and 10 deletions
|
|
@ -1548,7 +1548,7 @@ pub fn location_update(self: *Self, editor: *ed.Editor, m: tp.message) tp.result
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn location_update_from_editor(self: *Self) void {
|
fn location_update_from_editor(self: *Self) void {
|
||||||
const editor = self.get_active_editor() orelse return;
|
const editor = self.get_active_editor() orelse return;
|
||||||
const file_path = editor.file_path orelse return;
|
const file_path = editor.file_path orelse return;
|
||||||
const ephemeral = if (editor.buffer) |buffer| buffer.is_ephemeral() else false;
|
const ephemeral = if (editor.buffer) |buffer| buffer.is_ephemeral() else false;
|
||||||
|
|
|
||||||
|
|
@ -916,11 +916,6 @@ const Tab = struct {
|
||||||
try cbor.writeValue(writer, self.meta);
|
try cbor.writeValue(writer, self.meta);
|
||||||
try cbor.writeValue(writer, self.file_type_name);
|
try cbor.writeValue(writer, self.file_type_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn extract_state(self: *@This(), iter: *[]const u8) !void {
|
|
||||||
_ = self;
|
|
||||||
_ = iter;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const spacer = struct {
|
const spacer = struct {
|
||||||
|
|
|
||||||
|
|
@ -2096,13 +2096,12 @@ pub fn render_pointer_vcs(self: *renderer.Plane, vcs_status: u8, selected: bool)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn render_file_item(
|
fn render_file_item(
|
||||||
self: *renderer.Plane,
|
self: *renderer.Plane,
|
||||||
file_path_: []const u8,
|
file_path_: []const u8,
|
||||||
icon: []const u8,
|
icon: []const u8,
|
||||||
color: u24,
|
color: u24,
|
||||||
indicator: []const u8,
|
indicator: []const u8,
|
||||||
indicator_suffix: []const u8,
|
|
||||||
matches_cbor: []const u8,
|
matches_cbor: []const u8,
|
||||||
active: bool,
|
active: bool,
|
||||||
selected: bool,
|
selected: bool,
|
||||||
|
|
@ -2130,7 +2129,7 @@ pub fn render_file_item(
|
||||||
_ = self.print("{s} ", .{file_path_}) catch {};
|
_ = self.print("{s} ", .{file_path_}) catch {};
|
||||||
|
|
||||||
self.set_style(style_hint);
|
self.set_style(style_hint);
|
||||||
_ = self.print_aligned_right(0, "{s}{s} ", .{ indicator, indicator_suffix }) catch {};
|
_ = self.print_aligned_right(0, "{s} ", .{indicator}) catch {};
|
||||||
|
|
||||||
var iter = matches_cbor;
|
var iter = matches_cbor;
|
||||||
var index: usize = 0;
|
var index: usize = 0;
|
||||||
|
|
@ -2157,7 +2156,7 @@ pub fn render_file_item_cbor(self: *renderer.Plane, file_item_cbor: []const u8,
|
||||||
if (!(cbor.matchString(&iter, &indicator) catch false)) indicator = "";
|
if (!(cbor.matchString(&iter, &indicator) catch false)) indicator = "";
|
||||||
|
|
||||||
if (!(cbor.matchValue(&iter, cbor.extract_cbor(&matches_cbor)) catch false)) @panic("invalid matches cbor");
|
if (!(cbor.matchValue(&iter, cbor.extract_cbor(&matches_cbor)) catch false)) @panic("invalid matches cbor");
|
||||||
return render_file_item(self, file_path_, icon, color, indicator, &.{}, matches_cbor, active, selected, hover, theme_);
|
return render_file_item(self, file_path_, icon, color, indicator, matches_cbor, active, selected, hover, theme_);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn render_file_vcs_item(
|
pub fn render_file_vcs_item(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue