From a50e1e52fd7c62fda2d1804a3c7a860e47bf74a4 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 24 Apr 2026 15:49:57 -0400 Subject: init_channels() has to call scr_create(), fixes the garbage issue. --- src/main.c | 7 ++++--- src/screen.c | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 1ed7240..5bf2db5 100644 --- a/src/main.c +++ b/src/main.c @@ -82,10 +82,11 @@ void fn_disconnect(void) { void init_channels(void) { char i; - for(i = 0; i < MAX_SCREENS - 2; i++) { + /* TODO: handle up to MAX_SCREENS when config.channels grows + past 5 elements. */ + for(i = 0; /* i < MAX_SCREENS - 2 */ i < 6; i++) { if(config.channels[i][0]) { - screens[i + 2].status = SCR_INACTIVE; - strcpy(screens[i + 2].title, config.channels[i]); + scr_create(config.channels[i]); } } } diff --git a/src/screen.c b/src/screen.c index 5d64ee4..dd25938 100644 --- a/src/screen.c +++ b/src/screen.c @@ -65,6 +65,7 @@ char scr_create(const char *name) { screens[i].pool = pool; screens[i].line_list = (line_t *)END_MARKER; screens[i].line_count = screens[i].scrollback_pos = 0; + scr_display(i); return i; } } -- cgit v1.2.3