aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorache <ache@ache.one>2019-09-13 00:58:58 +0200
committerache <ache@ache.one>2019-09-13 00:58:58 +0200
commitd94ac247853feda2d5be2d6ab3d7629726fdd092 (patch)
tree5100af8c77c1f0261be74737a50881406539f465 /main.c
parentFix the over the last bug (diff)
Use default color background
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c
index 2d1ec05..94edda9 100644
--- a/main.c
+++ b/main.c
@@ -159,8 +159,12 @@ int main(int argc, char* argv[]){
int c;
int comp = 0;
+ int defaultBG = -1;
+
initscr();
if (has_colors()) {
+ if(use_default_colors() == ERR)
+ defaultBG = COLOR_BLACK;
CHECK(start_color);
}
@@ -184,8 +188,8 @@ int main(int argc, char* argv[]){
init_readline();
const int nbColor = sizeof colors / sizeof *colors;
- for(int i = 2 ; i < nbColor ; i++) {
- init_pair( i, colors[i], COLOR_BLACK);
+ for(int i = 1 ; i < nbColor ; i++) {
+ init_pair( i, colors[i], defaultBG);
}
// inotify stuff