diff options
| author | Přemysl Eric Janouch <p@janouch.name> | 2026-01-10 11:56:25 +0100 |
|---|---|---|
| committer | Přemysl Eric Janouch <p@janouch.name> | 2026-01-10 12:43:23 +0100 |
| commit | 45b1b16c777c55b9c0f9f055f19d55b2bcdf8162 (patch) | |
| tree | f82703e6805bc0f9699c14f821dedee4a41c7357 | |
| parent | 2728f9d1eb07d1d7e99866e749e4248197f0ec69 (diff) | |
| download | xK-45b1b16c777c55b9c0f9f055f19d55b2bcdf8162.tar.gz xK-45b1b16c777c55b9c0f9f055f19d55b2bcdf8162.tar.xz xK-45b1b16c777c55b9c0f9f055f19d55b2bcdf8162.zip | |
xC: fix libedit start from empty configuration
| -rw-r--r-- | LICENSE | 2 | ||||
| -rw-r--r-- | NEWS | 2 | ||||
| -rw-r--r-- | xC.c | 6 |
3 files changed, 8 insertions, 2 deletions
@@ -1,4 +1,4 @@ -Copyright (c) 2014 - 2025, Přemysl Eric Janouch <p@janouch.name> +Copyright (c) 2014 - 2026, 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. @@ -3,6 +3,8 @@ Unreleased * xC: added more characters as nickname delimiters, so that @nick works as a highlight + * xC: fixed libedit crash with empty configuration, hackfixed Readline >= 8.3 + * xC: prevented rare crashes in relay code * xP: added a network lag indicator to the user interface @@ -1,7 +1,7 @@ /* * xC.c: a terminal-based IRC client * - * Copyright (c) 2015 - 2024, Přemysl Eric Janouch <p@janouch.name> + * Copyright (c) 2015 - 2026, 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. @@ -572,6 +572,8 @@ input_rl_buffer_switch (void *input, input_buffer_t input_buffer) { struct input_rl *self = input; struct input_rl_buffer *buffer = input_buffer; + if (!self->active) + return; // There could possibly be occurences of the current undo list in some // history entry. We either need to free the undo list, or move it @@ -16150,6 +16152,8 @@ main (int argc, char *argv[]) on_refresh_prompt (&ctx); ctx.input->add_functions = input_add_functions; CALL_ (ctx.input, start, argv[0]); + // We start input after creating the first buffer, so attach history + CALL_ (ctx.input, buffer_switch, ctx.current_buffer->input_data); toggle_bracketed_paste (true); reset_autoaway (&ctx); |
