Hide the channel topic with Ctrl+Y

This commit is contained in:
Johannes Findeisen 2026-12-03 01:11:14 +01:00
commit 028efea8fd
2 changed files with 3 additions and 3 deletions

4
irc9.c
View file

@ -2464,7 +2464,7 @@ static void do_command(Window *window, char *line)
window_clear(window);
} else if (strcasecmp(cmd, "reconnect") == 0) {
if (!window) return;
appendf(t, " ctrl-y hide or show the channel tree");
appendf(t, " ctrl-y hide or show the channel tree and topic");
Server *s = window->srv;
appendf(serverwin(s), "* reconnecting to %s:%d", s->host, s->port);
disconnect_server(s);
@ -3142,7 +3142,7 @@ static void draw_pane_sides(void)
static int layout_topic(int draw)
{
int width = cols - treew - (copy_view ? 0 : 2);
if (!curwin || curwin->type != W_CHANNEL || mainh < 1 || width < 1)
if (tree_hidden || !curwin || curwin->type != W_CHANNEL || mainh < 1 || width < 1)
return 0;
const char *topic = curwin->topic[0] ? curwin->topic : "(no topic)";