-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Ncurses reports that VSCode integrated terminal can change colors, but redefining colors has no effect #104291
Copy link
Copy link
Closed
Labels
*duplicateIssue identified as a duplicate of another issue(s)Issue identified as a duplicate of another issue(s)info-neededIssue requires more information from posterIssue requires more information from poster
Description
VS Code version: Code - OSS 1.47.3 (91899dc, 2020-07-30T16:19:47.070Z)
OS version: Linux x64 5.7.11-arch1-1
Steps to Reproduce:
- Compile the minimal reproduction program:
#include <curses.h>
int main() {
initscr();
start_color();
if (has_colors() == TRUE && can_change_color() == TRUE) {
init_color(1, 0, 0, 1000); // redefine red to blue
init_pair(1, 1, 0); // fg=blue, bg=black
attron(COLOR_PAIR(1));
printw("Hello, world!"); // should be blue
attroff(COLOR_PAIR(1));
refresh();
getch();
}
endwin();
return 0;
}
gcc repro.c -lncurses -o repro.out
This program uses Ncurses to redefine the default terminal red color to blue and prints a string with the new color, only if the terminal (as reported by Ncurses) supports colors and redefining colors.
- Run
repro.outin an external terminal. The text should be blue (assuming your terminal supports colors and redefining them). - Run
repro.outin the VSCode integrated terminal. The text will be red (bug).
From the integrated terminal:
echo $TERM
> xterm-256color
Does this issue occur when all extensions are disabled?: Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
*duplicateIssue identified as a duplicate of another issue(s)Issue identified as a duplicate of another issue(s)info-neededIssue requires more information from posterIssue requires more information from poster