From 8e8ffe2c73b55ee1beeca41d97bddb1a55b4602e Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Sat, 10 Apr 2021 05:11:46 +0200 Subject: degesch: don't switch to channels while typing We might just always set the highlighted bit on, it would be consistent with PMs. --- LICENSE | 2 +- degesch.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/LICENSE b/LICENSE index b60d4d9..9621647 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014 - 2020, Přemysl Eric Janouch
+Copyright (c) 2014 - 2021, Přemysl Eric Janouch
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. diff --git a/degesch.c b/degesch.c index 690e46a..15066c8 100644 --- a/degesch.c +++ b/degesch.c @@ -1,7 +1,7 @@ /* * degesch.c: a terminal-based IRC client * - * Copyright (c) 2015 - 2020, Přemysl Eric Janouch
+ * Copyright (c) 2015 - 2021, Přemysl Eric Janouch
* * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted. @@ -6665,8 +6665,13 @@ irc_handle_join (struct server *s, const struct irc_message *msg) str_map_set (&s->irc_buffer_map, channel->name, buffer); buffer_add (s->ctx, buffer); - // XXX: this is annoying, consider only doing it a while after /join - buffer_activate (s->ctx, buffer); + + char *input = CALL (s->ctx->input, get_line); + if (!*input) + buffer_activate (s->ctx, buffer); + else + buffer->highlighted = true; + free (input); } if (irc_is_this_us (s, msg->prefix)) -- cgit v1.2.3-70-g09d2