… | |
… | |
4015 | } |
4015 | } |
4016 | |
4016 | |
4017 | void |
4017 | void |
4018 | rxvt_term::set_cursor_style (int style) |
4018 | rxvt_term::set_cursor_style (int style) |
4019 | { |
4019 | { |
4020 | if (!IN_RANGE_INC (style, 0, 4)) |
4020 | if (!IN_RANGE_INC (style, 0, 6)) |
4021 | return; |
4021 | return; |
4022 | |
4022 | |
|
|
4023 | if (style == 0) |
|
|
4024 | style = 1; |
|
|
4025 | |
|
|
4026 | cursor_type = (style - 1) / 2; |
4023 | set_option (Opt_cursorUnderline, style >= 3); |
4027 | set_option (Opt_cursorUnderline, cursor_type == 1); |
4024 | |
4028 | |
4025 | #ifdef CURSOR_BLINK |
4029 | #ifdef CURSOR_BLINK |
4026 | set_option (Opt_cursorBlink, !style || (style & 1)); |
4030 | set_option (Opt_cursorBlink, style & 1); |
4027 | cursor_blink_reset (); |
4031 | cursor_blink_reset (); |
4028 | #endif |
4032 | #endif |
4029 | |
4033 | |
4030 | want_refresh = 1; |
4034 | want_refresh = 1; |
4031 | } |
4035 | } |