Compare commits

..

No commits in common. "720bb9515fe0be2013f6b58f42d6dc5fb0a1f3fa" and "bf0d4402ea5470f06b79728ea6cec701c054ad98" have entirely different histories.

3 changed files with 6 additions and 14 deletions

View file

@ -4382,12 +4382,11 @@ pub const Editor = struct {
const root = try self.buf_root();
const cursel = self.get_primary();
cursel.check_selection(root, self.metrics);
if (cursel.selection) |_| {
if (cursel.selection) |_|
try if (unnamed)
self.shrink_selection_to_child_node(root, cursel, self.metrics)
else
self.shrink_selection_to_named_child_node(root, cursel, self.metrics);
} else try cursel.select_node(try self.top_node_at_cursel(cursel, root, self.metrics), root, self.metrics);
self.clamp();
try self.send_editor_jump_destination();
}
@ -4416,12 +4415,10 @@ pub const Editor = struct {
const root = try self.buf_root();
const cursel = self.get_primary();
cursel.check_selection(root, self.metrics);
if (cursel.selection) |_| {
try if (unnamed)
self.select_next_sibling_node(root, cursel, self.metrics)
else
self.select_next_named_sibling_node(root, cursel, self.metrics);
} else try cursel.select_node(try self.top_node_at_cursel(cursel, root, self.metrics), root, self.metrics);
try if (unnamed)
self.select_next_sibling_node(root, cursel, self.metrics)
else
self.select_next_named_sibling_node(root, cursel, self.metrics);
self.clamp();
try self.send_editor_jump_destination();
}

View file

@ -34,7 +34,7 @@ pub fn load_entries(palette: *Type) !usize {
.indicator = indicator,
};
}
return if (palette.entries.items.len == 0) label.len + 3 else 4;
return if (palette.entries.items.len == 0) label.len else 4;
}
pub fn clear_entries(palette: *Type) void {

View file

@ -35,11 +35,6 @@ const cmds_ = struct {
}
pub const @"q!_meta": Meta = .{ .description = "q! (quit without saving)" };
pub fn @"qa!"(_: *void, _: Ctx) Result {
try cmd("quit_without_saving", .{});
}
pub const @"qa!_meta": Meta = .{ .description = "qa! (quit without saving anything)" };
pub fn wq(_: *void, _: Ctx) Result {
try cmd("save_file", command.fmt(.{ "then", .{ "quit", .{} } }));
}