From f20a1e9d947fdfe6eb723ee1919a1a71f4e1345a Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Wed, 2 Dec 2026 01:44:02 +0100 Subject: [PATCH] Use a single marker for folded servers --- README.md | 2 +- irc9.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a045509..db24d08 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ uppercase names sorting before lowercase names in each group. An unread window shows `(n)` next to its name. Each server shows its total unread count after its name, including when folded. The server count appears after startup channel joins finish. Unread counts include chat messages, actions, and chat notices. -`*` marks a connected server. The selected server or window is shown bold and underlined. Highlights use the +`*` marks an unfolded, connected server. `+` marks a folded server. The selected server or window is shown bold and underlined. Highlights use the terminal's default background so transparency is preserved where supported. Channel topics wrap to the chat pane width and stay at the top while you scroll. On short terminals, the topic leaves room for at least one chat line when possible. diff --git a/irc9.c b/irc9.c index 35009a1..f8556ff 100644 --- a/irc9.c +++ b/irc9.c @@ -2845,10 +2845,10 @@ static void draw_tree(void) if (treew > 3) { terminal_move(y, 1); fputs(w == curwin ? (terminal_color ? "\033[1;4m" : "\033[7m") : "\033[1m", stdout); - putchar(s->connected ? '*' : ' '); - if (s->tree_folded) putchar('+'); + char marker = s->connected ? '*' : ' '; + putchar(s->tree_folded ? '+' : marker); long long unread = server_unread_messages(s); - int columns = treew - 3 - s->tree_folded; + int columns = treew - 3; char count[32] = ""; int count_width = unread ? snprintf(count, sizeof count, " (%lld)", unread) : 0; if (count_width > columns) count_width = 0;