mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-24 11:37:10 +08:00
Readd unconst cast to tparm
calls
Removed in 0dfa7421f3
, breaks build with NetBSD curses.
This commit is contained in:
parent
f1ce967dfa
commit
484e590b7b
|
@ -1153,7 +1153,7 @@ void s_reset(screen_t *s, screen_reset_mode_t mode) {
|
|||
if (screen_width > non_space_width) {
|
||||
bool justgrey = true;
|
||||
if (cur_term && enter_dim_mode) {
|
||||
std::string dim = tparm(enter_dim_mode);
|
||||
std::string dim = tparm((char *)enter_dim_mode);
|
||||
if (!dim.empty()) {
|
||||
// Use dim if they have it, so the color will be based on their actual normal
|
||||
// color and the background of the termianl.
|
||||
|
@ -1164,14 +1164,14 @@ void s_reset(screen_t *s, screen_reset_mode_t mode) {
|
|||
if (cur_term && justgrey && set_a_foreground) {
|
||||
if (max_colors >= 238) {
|
||||
// draw the string in a particular grey
|
||||
abandon_line_string.append(str2wcstring(tparm(set_a_foreground, 237)));
|
||||
abandon_line_string.append(str2wcstring(tparm((char *)set_a_foreground, 237)));
|
||||
} else if (max_colors >= 9) {
|
||||
// bright black (the ninth color, looks grey)
|
||||
abandon_line_string.append(str2wcstring(tparm(set_a_foreground, 8)));
|
||||
abandon_line_string.append(str2wcstring(tparm((char *)set_a_foreground, 8)));
|
||||
} else if (max_colors >= 2 && enter_bold_mode) {
|
||||
// we might still get that color by setting black and going bold for bright
|
||||
abandon_line_string.append(str2wcstring(tparm(enter_bold_mode)));
|
||||
abandon_line_string.append(str2wcstring(tparm(set_a_foreground, 0)));
|
||||
abandon_line_string.append(str2wcstring(tparm((char *)enter_bold_mode)));
|
||||
abandon_line_string.append(str2wcstring(tparm((char *)set_a_foreground, 0)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1179,7 +1179,7 @@ void s_reset(screen_t *s, screen_reset_mode_t mode) {
|
|||
|
||||
if (cur_term && exit_attribute_mode) {
|
||||
abandon_line_string.append(
|
||||
str2wcstring(tparm(exit_attribute_mode))); // normal text ANSI escape sequence
|
||||
str2wcstring(tparm((char *)exit_attribute_mode))); // normal text ANSI escape sequence
|
||||
}
|
||||
|
||||
int newline_glitch_width = term_has_xn ? 0 : 1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user