73ad3949
main: collapse duplicate arm branches in reconfigureBlink
a73x 2026-04-19 07:07
Commit message
src/main.zig
| Old | New | ||
|---|---|---|---|
| @@ -839,13 +839,7 @@ fn reconfigureBlink( | |||
| 839 | now_ns: i128, | 839 | now_ns: i128, |
| 840 | ) BlinkReconfigure { | 840 | ) BlinkReconfigure { |
| 841 | if (want_blink) { | 841 | if (want_blink) { |
| 842 | if (state.next_deadline_ns == null) { | 842 | if (state.next_deadline_ns == null or cursor_identity_changed or focus_regained) { |
| 843 | return .{ | ||
| 844 | .state = .{ .blink_on = true, .next_deadline_ns = now_ns + blink_period_ns }, | ||
| 845 | .cursor_rebuild = true, | ||
| 846 | }; | ||
| 847 | } | ||
| 848 | if (cursor_identity_changed or focus_regained) { | ||
| 849 | return .{ | 843 | return .{ |
| 850 | .state = .{ .blink_on = true, .next_deadline_ns = now_ns + blink_period_ns }, | 844 | .state = .{ .blink_on = true, .next_deadline_ns = now_ns + blink_period_ns }, |
| 851 | .cursor_rebuild = true, | 845 | .cursor_rebuild = true, |