Merge master-pre-zig-0.14 into zig-0.13

This commit is contained in:
CJ van den Berg 2025-02-06 21:11:35 +01:00
commit 72234e7cb3
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 13 additions and 7 deletions

View file

@ -2466,8 +2466,14 @@ pub const Editor = struct {
if (primary.selection) |_| {} else {
const sel = primary.enable_selection(root, self.metrics) catch return;
try move_cursor_begin(root, &sel.begin, self.metrics);
try move_cursor_end(root, &sel.end, self.metrics);
try move_cursor_right(root, &sel.end, self.metrics);
move_cursor_end(root, &sel.end, self.metrics) catch |e| switch (e) {
error.Stop => {},
else => return e,
};
move_cursor_right(root, &sel.end, self.metrics) catch |e| switch (e) {
error.Stop => {},
else => return e,
};
};
var first = true;
var text = std.ArrayList(u8).init(self.allocator);