From ef69e8bd6c61f7ff3d7002cb1780da8a574dd646 Mon Sep 17 00:00:00 2001 From: andmarti1424 Date: Sun, 2 Apr 2017 21:41:22 -0300 Subject: little mod in update() --- src/cmds_normal.c | 13 ------------- src/screen.c | 15 ++++++++------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/cmds_normal.c b/src/cmds_normal.c index 0b9b74e..af8a62f 100644 --- a/src/cmds_normal.c +++ b/src/cmds_normal.c @@ -1009,8 +1009,6 @@ void do_normalmode(struct block * buf) { case ctl('r'): #ifdef UNDO do_redo(); - // sync_refs(); - //EvalAll(); update(TRUE); break; #else @@ -1055,17 +1053,6 @@ void do_normalmode(struct block * buf) { } case ctl('l'): - /* - endwin(); - start_screen(); - clearok(stdscr, TRUE); - update(TRUE); - flushinp(); - show_header(input_win); - show_celldetails(input_win); - wrefresh(input_win); - update(TRUE); - */ winchg(); break; diff --git a/src/screen.c b/src/screen.c index ce1488d..fe991b1 100644 --- a/src/screen.c +++ b/src/screen.c @@ -131,17 +131,19 @@ void do_welcome() { // function that refreshes grid of screen -// if header flag is set, it refresh the first column of screen. +// if header flag is set, the first column of screen gets refreshed void update(int header) { - #ifdef USECOLORS - wbkgd(main_win, COLOR_PAIR((ucolors[DEFAULT].fg+1) * 9 + ucolors[DEFAULT].bg + 2)); - wbkgd(input_win, COLOR_PAIR((ucolors[DEFAULT].fg+1) * 9 + ucolors[DEFAULT].bg + 2)); - #endif if (loading) return; if (cmd_multiplier > 1) return; if (atoi(get_conf_value("nocurses"))) return; + #ifdef USECOLORS + if (header) { + wbkgd(main_win, COLOR_PAIR((ucolors[DEFAULT].fg+1) * 9 + ucolors[DEFAULT].bg + 2)); + wbkgd(input_win, COLOR_PAIR((ucolors[DEFAULT].fg+1) * 9 + ucolors[DEFAULT].bg + 2)); + } + #endif // Clean from top to bottom if (header) { wmove(main_win, 0, rescol); @@ -189,8 +191,7 @@ void update(int header) { wrefresh(main_win); // Show cell details in header (first row) - if (header) - show_celldetails(input_win); + if (header) show_celldetails(input_win); // print mode (void) print_mode(input_win); -- cgit v1.2.3