Merge branch 'master' into zig-0.15

This commit is contained in:
CJ van den Berg 2025-08-27 00:04:58 +02:00
commit 15990b9dce
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 39 additions and 6 deletions

View file

@ -385,6 +385,11 @@ pub fn process_renderer_event(self: *Self, msg: []const u8) Error!void {
self.vx.caps.rgb = true;
},
.cap_color_scheme_updates => {},
.cap_multi_cursor => {
self.logger.print("multi cursor capability detected", .{});
self.vx.caps.multi_cursor = true;
},
}
}
@ -538,6 +543,14 @@ pub fn cursor_disable(self: *Self) void {
self.vx.screen.cursor_vis = false;
}
pub fn clear_all_multi_cursors(self: *Self) !void {
try self.tty.anyWriter().print("\x1b[>0;4 q", .{});
}
pub fn show_multi_cursor_yx(self: *Self, y: c_int, x: c_int) !void {
try self.tty.anyWriter().print("\x1b[>-1;2:{d}:{d} q", .{ y + 1, x + 1 });
}
fn sync_mod_state(self: *Self, keypress: u32, modifiers: vaxis.Key.Modifiers) !void {
if (modifiers.ctrl and !self.mods.ctrl and !(keypress == input.key.left_control or keypress == input.key.right_control))
try self.send_sync_key(input.event.press, input.key.left_control, "", modifiers);