Hide the channel topic with Ctrl+Y

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

View file

@ -175,7 +175,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) | | `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+Left` / `Ctrl+Right` | move to the previous / next word in the input line |
| `Ctrl+PgUp` / `Ctrl+PgDn` | scroll the channel tree by one row | | `Ctrl+PgUp` / `Ctrl+PgDn` | scroll the channel tree by one row |
| `Ctrl+Y` | hide or show the channel tree | | `Ctrl+Y` | hide or show the channel tree and channel topic |
| `Ctrl+N` or `Ctrl+Down` / `Ctrl+P` or `Ctrl+Up` | next / previous visible window (tree order, wraps around) | | `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) | | Enter | with empty input, fold or unfold a server, or toggle a chat’s sticky status (`*` after its name) |
| `Ctrl+O` | toggle hiding inactive channels and private chats with no unread messages. Active and sticky chats stay visible when their server is unfolded | | `Ctrl+O` | toggle hiding inactive channels and private chats with no unread messages. Active and sticky chats stay visible when their server is unfolded |

4
irc9.c
View file

@ -2484,7 +2484,7 @@ static void do_command(Window *window, char *line)
appendf(t, "keys: ctrl-n / ctrl-p switch windows, pgup/pgdn scroll, ctrl-l clear screen"); appendf(t, "keys: ctrl-n / ctrl-p switch windows, pgup/pgdn scroll, ctrl-l clear screen");
appendf(t, " ctrl-up / ctrl-down scroll the channel tree"); appendf(t, " ctrl-up / ctrl-down scroll the channel tree");
appendf(t, " ctrl-s save scrollback, ctrl-t toggle copy view"); appendf(t, " ctrl-s save scrollback, ctrl-t toggle copy view");
appendf(t, " ctrl-y hide or show the channel tree"); appendf(t, " ctrl-y hide or show the channel tree and topic");
} else { } else {
if (window) appendf(window, "* unknown command: /%s", cmd); if (window) appendf(window, "* unknown command: /%s", cmd);
} }
@ -3142,7 +3142,7 @@ static void draw_pane_sides(void)
static int layout_topic(int draw) static int layout_topic(int draw)
{ {
int width = cols - treew - (copy_view ? 0 : 2); 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; return 0;
const char *topic = curwin->topic[0] ? curwin->topic : "(no topic)"; const char *topic = curwin->topic[0] ? curwin->topic : "(no topic)";