Merge branch 'master' into zig-0.15

This commit is contained in:
CJ van den Berg 2025-09-25 22:04:17 +02:00
commit 720bb9515f
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 14 additions and 6 deletions

View file

@ -4382,11 +4382,12 @@ 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();
}
@ -4415,10 +4416,12 @@ pub const Editor = struct {
const root = try self.buf_root();
const cursel = self.get_primary();
cursel.check_selection(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);
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);
self.clamp();
try self.send_editor_jump_destination();
}