diff options
Diffstat (limited to 'src/screen.c')
| -rw-r--r-- | src/screen.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/screen.c b/src/screen.c index 1bd239a..13e0cfc 100644 --- a/src/screen.c +++ b/src/screen.c @@ -143,17 +143,19 @@ void scr_show_status(char s) { int i; char *p, sc; - status_box[0] = (s % 10) + 177; /* inverse number */ + // status_box[0] = (s % 10) + 177; /* inverse number */ + if(s > 8) s -= 8; /* 9 => 0, 10 => 1, etc */ + status_box[0] = s + 177; status_box[1] = ':'; strncpy(status_box + 2, screens[s].title, 32); p = status_box + 43; /* one space past the 2nd indicator */ + memclear(status_box + 43, 17); + for(i = 0; i < MAX_SCREENS; i++) { sc = (i % 10) + '1'; switch(screens[i].status) { - case SCR_INACTIVE: /* color0 */ - break; case SCR_ACTIVE: /* color1 */ sc |= 0x40; break; @@ -163,8 +165,9 @@ void scr_show_status(char s) { case SCR_HILITE: /* color3 */ sc |= 0xc0; break; + case SCR_INACTIVE: default: - continue; /* don't show anything for unused */ + continue; /* don't show anything for inactive or unused */ } *p++ = sc; } @@ -228,7 +231,7 @@ void scr_putc(char s, char c) { return; } - if(xpos == 0 || xpos == LINE_LEN) { + if(screens[s].line_list == (line_t *)END_MARKER || xpos == LINE_LEN) { add_line(s); xpos = 0; } |
