diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-04-10 05:11:46 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-04-10 05:11:46 +0200 |
commit | 8e8ffe2c73b55ee1beeca41d97bddb1a55b4602e (patch) | |
tree | 3daec054655dc159db4ccece46ab5278e4f31428 /degesch.c | |
parent | d05c85833d09e9b7da6c264c2ae66b30d0d6c882 (diff) | |
download | xK-8e8ffe2c73b55ee1beeca41d97bddb1a55b4602e.tar.gz xK-8e8ffe2c73b55ee1beeca41d97bddb1a55b4602e.tar.xz xK-8e8ffe2c73b55ee1beeca41d97bddb1a55b4602e.zip |
degesch: don't switch to channels while typing
We might just always set the highlighted bit on,
it would be consistent with PMs.
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1,7 +1,7 @@ /* * degesch.c: a terminal-based IRC client * - * Copyright (c) 2015 - 2020, Přemysl Eric Janouch <p@janouch.name> + * Copyright (c) 2015 - 2021, Přemysl Eric Janouch <p@janouch.name> * * 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)) |