tty/tty.zig — setCursorStyle blink/steady mapping is invertedtty/tty.zig — setCursorStyle blink/steady mapping is invertedFile: src/tty/tty.zig:325–329
Severity: MEDIUM
Status: ✅ FIXED — swapped values: visible cursor now emits blinking variant (1/3/5), hidden emits steady (2/4/6). Test updated.
const n: u8 = switch (style) {
.block => if (self.cursor_visible) 2 else 1,
.underline => if (self.cursor_visible) 4 else 3,
.bar => if (self.cursor_visible) 6 else 5,
};
DECSCUSR sequences: 1=blinking block, 2=steady block, 3=blinking underline, 4=steady underline, 5=blinking bar, 6=steady bar. The code emits steady styles (2/4/6) when the cursor IS visible and blinking styles (1/3/5) when hidden. This is backwards — a visible cursor should blink. Additionally, cursor_visible tracks show/hide state (DECTCEM), not blink preference, conflating two independent concepts.