diff --git a/README.md b/README.md index a22728d..7ce4a02 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ MODE, TOPIC, and INVITE events are shown in the relevant window. | --- | --- | | `Tab` | complete a `/` command or a nick; press again to cycle matches (recently completed nicks come first) | | `Ctrl+Left` / `Ctrl+Right` | move to the previous / next word in the input line | -| `Ctrl+Y` | hide or show the channel tree | +| `Ctrl+Y` | hide or show the channel tree and channel topic | | `Ctrl+PgUp` / `Ctrl+PgDn` | scroll the channel tree by one row | | `Ctrl+N` or `Ctrl+Down` / `Ctrl+P` or `Ctrl+Up` | next / previous visible window (tree order, wraps around) | | Enter | with empty input, fold or unfold a server, or toggle a chat’s sticky status (`*` after its name) | diff --git a/irc9.c b/irc9.c index 6ed605c..f465b13 100644 --- a/irc9.c +++ b/irc9.c @@ -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)";