Draw channel tree entries below the top border
This commit is contained in:
parent
981a803d6c
commit
a7279840f0
1 changed files with 4 additions and 6 deletions
10
irc9.c
10
irc9.c
|
|
@ -2429,9 +2429,7 @@ static void draw_tree(void)
|
|||
if (treew < 2 || lines < 6) return;
|
||||
terminal_accent();
|
||||
terminal_move(1, 0);
|
||||
putchar('/');
|
||||
terminal_repeat('-', treew - 2);
|
||||
putchar('\\');
|
||||
terminal_repeat('-', treew);
|
||||
for (int row = 2; row < bottom; row++) {
|
||||
terminal_move(row, 0);
|
||||
putchar('|');
|
||||
|
|
@ -2443,9 +2441,9 @@ static void draw_tree(void)
|
|||
terminal_repeat('_', treew - 2);
|
||||
putchar('/');
|
||||
fputs("\033[0m", stdout);
|
||||
int y = 1;
|
||||
int y = 2;
|
||||
for (Server *s = servers; s; s = s->next) {
|
||||
if (y >= bottom - 1) break;
|
||||
if (y >= bottom) break;
|
||||
int selected = (serverwin(s) == curwin);
|
||||
if (treew > 3) {
|
||||
terminal_move(y, 1);
|
||||
|
|
@ -2456,7 +2454,7 @@ static void draw_tree(void)
|
|||
}
|
||||
y++;
|
||||
for (Window *w = s->windows->next; w; w = w->next) {
|
||||
if (y >= bottom - 1) break;
|
||||
if (y >= bottom) break;
|
||||
char label[CHANLEN + 16];
|
||||
if (w->unread) snprintf(label, sizeof label, "%s(%d)", w->name, w->unread);
|
||||
else snprintf(label, sizeof label, "%s", w->name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue