Compare commits
No commits in common. "f68102e44878721c27dc0bfc19261ae482bdac53" and "ec8379ce5123341e0cdf35ad4f7a2477d0466092" have entirely different histories.
f68102e448
...
ec8379ce51
3 changed files with 3 additions and 27 deletions
|
|
@ -109,8 +109,8 @@ fn clamp_row(self: *Self, cursor: *const Cursor, abs: bool, bottom_offset: usize
|
|||
}
|
||||
if (cursor.row < self.row) {
|
||||
self.row = 0;
|
||||
} else if (cursor.row > self.row + self.rows -| bottom_min_border_distance) {
|
||||
self.row = cursor.row + bottom_min_border_distance -| self.rows;
|
||||
} else if (cursor.row > self.row + self.rows - bottom_min_border_distance) {
|
||||
self.row = cursor.row + bottom_min_border_distance - self.rows;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
["ctrl+8", "focus_split", 7],
|
||||
["ctrl+`", "focus_terminal"],
|
||||
["ctrl+j", "toggle_panel"],
|
||||
["ctrl+shift+j", "toggle_maximize_panel"],
|
||||
["ctrl+q", "quit"],
|
||||
["ctrl+w", "close_split"],
|
||||
["ctrl+o", "open_file"],
|
||||
|
|
@ -603,7 +602,6 @@
|
|||
["alt+shift+p", "open_command_palette"],
|
||||
["alt+x", "open_command_palette"],
|
||||
["alt+!", "run_task"],
|
||||
["ctrl+shift+j", "toggle_maximize_panel"],
|
||||
["alt+f9", "panel_next_widget_style"],
|
||||
["ctrl+shift+q", "quit_without_saving"],
|
||||
["ctrl+alt+shift+r", "restart"]
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ buffer_manager: Buffer.Manager,
|
|||
find_in_files_state: enum { init, adding, done } = .done,
|
||||
file_list_type: FileListType = .find_in_files,
|
||||
panel_height: ?usize = null,
|
||||
panel_maximized: bool = false,
|
||||
symbols: std.ArrayListUnmanaged(u8) = .empty,
|
||||
symbols_complete: bool = true,
|
||||
closing_project: bool = false,
|
||||
|
|
@ -261,10 +260,6 @@ pub fn handle_resize(self: *Self, pos: Box) void {
|
|||
if (self.panel_height) |h| if (h >= self.box().h) {
|
||||
self.panel_height = null;
|
||||
};
|
||||
if (self.panel_maximized) {
|
||||
if (self.panels) |panels|
|
||||
panels.layout_ = .{ .static = self.box().h -| 1 };
|
||||
}
|
||||
self.widgets.handle_resize(pos);
|
||||
self.floating_views.resize(pos);
|
||||
}
|
||||
|
|
@ -286,7 +281,6 @@ fn bottom_bar_primary_drag(self: *Self, y: usize) tp.result {
|
|||
};
|
||||
const h = self.plane.dim_y();
|
||||
self.panel_height = @max(1, h - @min(h, y + 1));
|
||||
self.panel_maximized = false;
|
||||
panels.layout_ = .{ .static = self.panel_height.? };
|
||||
if (self.panel_height == 1) {
|
||||
self.panel_height = null;
|
||||
|
|
@ -945,26 +939,10 @@ const cmds = struct {
|
|||
else if (self.is_panel_view_showing(terminal_view))
|
||||
try self.toggle_panel_view(terminal_view, .toggle)
|
||||
else
|
||||
try focus_terminal(self, .{});
|
||||
try self.toggle_panel_view(logview, .toggle);
|
||||
}
|
||||
pub const toggle_panel_meta: Meta = .{ .description = "Toggle panel" };
|
||||
|
||||
pub fn toggle_maximize_panel(self: *Self, _: Ctx) Result {
|
||||
const panels = self.panels orelse return;
|
||||
const max_h = self.box().h -| 1;
|
||||
if (self.panel_maximized) {
|
||||
// Restore previous height
|
||||
self.panel_maximized = false;
|
||||
panels.layout_ = .{ .static = self.get_panel_height() };
|
||||
} else {
|
||||
// Maximize: fill screen minus status bar
|
||||
self.panel_maximized = true;
|
||||
panels.layout_ = .{ .static = max_h };
|
||||
}
|
||||
tui.resize();
|
||||
}
|
||||
pub const toggle_maximize_panel_meta: Meta = .{ .description = "Toggle maximize panel" };
|
||||
|
||||
pub fn toggle_logview(self: *Self, _: Ctx) Result {
|
||||
try self.toggle_panel_view(logview, .toggle);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue