refactor(tui): centralize native cursor check in has_native_cursor()

This commit is contained in:
CJ van den Berg 2026-04-07 11:30:37 +02:00
parent 908f780605
commit b0d32f3581
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
6 changed files with 15 additions and 11 deletions

View file

@ -51,7 +51,7 @@ pub fn Options(context: type) type {
}
if (self.cursor) |cursor| {
const pos: c_int = @intCast(cursor);
if (tui.config().enable_terminal_cursor) {
if (tui.has_native_cursor()) {
const y, const x = self.plane.rel_yx_to_abs(0, pos + self.opts.padding + self.icon_width);
tui.rdr().cursor_enable(y, x, tui.get_cursor_shape()) catch {};
} else {