From 15f79a713f3e100a3b96b65e951fb37ae8994bdd Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 23 Mar 2016 00:07:43 +0100 Subject: set version to 0.8.18a-head --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5f36a7f0..44a986f2 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(irssi, 0.8.18) +AC_INIT(irssi, 0.8.18a-head) AC_CONFIG_SRCDIR([src]) AC_CONFIG_AUX_DIR(build-aux) AC_PREREQ(2.50) -- cgit v1.2.3 From 22d772890e6f3b9622485fd83529f73891567e71 Mon Sep 17 00:00:00 2001 From: dx Date: Tue, 26 Jan 2016 03:25:07 -0300 Subject: Merge pull request #405 from LemonBoy/serialize-channel-name Serialize the 'name' attribute of the CHANNEL_REC. --- src/fe-common/core/windows-layout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fe-common/core/windows-layout.c b/src/fe-common/core/windows-layout.c index 8ebcc12d..ce6b9910 100644 --- a/src/fe-common/core/windows-layout.c +++ b/src/fe-common/core/windows-layout.c @@ -168,12 +168,12 @@ static void sig_layout_save_item(WINDOW_REC *window, WI_ITEM_REC *item, chat_protocol_find_id(item->chat_type); if (proto != NULL) iconfig_node_set_str(subnode, "chat_type", proto->name); - iconfig_node_set_str(subnode, "name", item->visible_name); + iconfig_node_set_str(subnode, "name", item->name); if (item->server != NULL) { iconfig_node_set_str(subnode, "tag", item->server->tag); if (IS_CHANNEL(item)) { - rec = window_bind_add(window, item->server->tag, item->visible_name); + rec = window_bind_add(window, item->server->tag, item->name); if (rec != NULL) rec->sticky = TRUE; } -- cgit v1.2.3 From 025f08d5fc69d6e9c28004f8f7af26f613b0e0fb Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Fri, 29 Jan 2016 05:33:14 +0100 Subject: Merge pull request #407 from irssi/ailin-nemui-perl-bugs Mention known Perl Bugs in perl.txt --- docs/perl.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/perl.txt b/docs/perl.txt index 9688341f..59f65462 100644 --- a/docs/perl.txt +++ b/docs/perl.txt @@ -1193,3 +1193,7 @@ Client->{} -------------------- * Calling die in 'script error' handler causes segfault (#101) * Storing and later using any Irssi object may result in use-after-free related crash + - Workaround: always acquire fresh objects +* Calling $dcc->close from the "dcc created" signal will cause unstable behaviour and crashes (#386) + - Workaround: use "dcc request" signal instead AND call + &Irssi::signal_continue(@_); as the first thing -- cgit v1.2.3 From 4416942fcdd426385cc3ef7a912f9260627b8a39 Mon Sep 17 00:00:00 2001 From: Giuseppe Date: Tue, 8 Mar 2016 22:49:05 +0100 Subject: Merge pull request #432 from grawity/fix-external fix SASL EXTERNAL --- src/irc/core/sasl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/irc/core/sasl.c b/src/irc/core/sasl.c index a04eaf45..8fba9ba2 100644 --- a/src/irc/core/sasl.c +++ b/src/irc/core/sasl.c @@ -145,7 +145,7 @@ static void sasl_step(IRC_SERVER_REC *server, const char *data, const char *from case SASL_MECHANISM_EXTERNAL: /* Empty response */ - irc_send_cmdv(server, "+"); + irc_send_cmdv(server, "AUTHENTICATE +"); break; } -- cgit v1.2.3 From d20872ac27c63f2c92775a12c99a7494148901ca Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Thu, 17 Mar 2016 16:14:34 +0100 Subject: Merge pull request #438 from dequis/sasl-timeout-disconnect Remove sasl timeout source when the server disconnects --- src/irc/core/sasl.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/irc/core/sasl.c b/src/irc/core/sasl.c index 8fba9ba2..db099368 100644 --- a/src/irc/core/sasl.c +++ b/src/irc/core/sasl.c @@ -153,6 +153,20 @@ static void sasl_step(IRC_SERVER_REC *server, const char *data, const char *from server->sasl_timeout = g_timeout_add(SASL_TIMEOUT, (GSourceFunc) sasl_timeout, server); } +static void sasl_disconnected(IRC_SERVER_REC *server) +{ + g_return_if_fail(server != NULL); + + if (!IS_IRC_SERVER(server)) { + return; + } + + if (server->sasl_timeout != -1) { + g_source_remove(server->sasl_timeout); + server->sasl_timeout = -1; + } +} + void sasl_init(void) { signal_add_first("server cap ack sasl", (SIGNAL_FUNC) sasl_start); @@ -163,6 +177,7 @@ void sasl_init(void) signal_add_first("event 905", (SIGNAL_FUNC) sasl_fail); signal_add_first("event 906", (SIGNAL_FUNC) sasl_fail); signal_add_first("event 907", (SIGNAL_FUNC) sasl_already); + signal_add_first("server disconnected", (SIGNAL_FUNC) sasl_disconnected); } void sasl_deinit(void) @@ -175,4 +190,5 @@ void sasl_deinit(void) signal_remove("event 905", (SIGNAL_FUNC) sasl_fail); signal_remove("event 906", (SIGNAL_FUNC) sasl_fail); signal_remove("event 907", (SIGNAL_FUNC) sasl_already); + signal_remove("server disconnected", (SIGNAL_FUNC) sasl_disconnected); } -- cgit v1.2.3 From 7d3fe66e50fc3c47783d9beb0474a4ed9d2d9953 Mon Sep 17 00:00:00 2001 From: TheLemonMan Date: Thu, 17 Mar 2016 22:07:57 +0100 Subject: Merge pull request #439 from horgh/ssl-errors Clear error queue before SSL I/O operations --- src/core/network-openssl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c index 465c4154..a18e6fc7 100644 --- a/src/core/network-openssl.c +++ b/src/core/network-openssl.c @@ -289,6 +289,7 @@ static GIOStatus irssi_ssl_read(GIOChannel *handle, gchar *buf, gsize len, gsize const char *errstr; gchar *errmsg; + ERR_clear_error(); ret1 = SSL_read(chan->ssl, buf, len); if(ret1 <= 0) { @@ -334,6 +335,7 @@ static GIOStatus irssi_ssl_write(GIOChannel *handle, const gchar *buf, gsize len const char *errstr; gchar *errmsg; + ERR_clear_error(); ret1 = SSL_write(chan->ssl, (const char *)buf, len); if(ret1 <= 0) { @@ -471,6 +473,7 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, int port, SERVER_ if(!(fd = g_io_channel_unix_get_fd(handle))) return NULL; + ERR_clear_error(); ctx = SSL_CTX_new(SSLv23_client_method()); if (ctx == NULL) { g_error("Could not allocate memory for SSL context"); @@ -489,6 +492,7 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, int port, SERVER_ scert = convert_home(mycert); if (mypkey && *mypkey) spkey = convert_home(mypkey); + ERR_clear_error(); if (! SSL_CTX_use_certificate_file(ctx, scert, SSL_FILETYPE_PEM)) g_warning("Loading of client certificate '%s' failed: %s", mycert, ERR_reason_error_string(ERR_get_error())); else if (! SSL_CTX_use_PrivateKey_file(ctx, spkey ? spkey : scert, SSL_FILETYPE_PEM)) @@ -581,6 +585,7 @@ int irssi_ssl_handshake(GIOChannel *handle) X509 *cert; const char *errstr; + ERR_clear_error(); ret = SSL_connect(chan->ssl); if (ret <= 0) { err = SSL_get_error(chan->ssl, ret); -- cgit v1.2.3 From 15296a0165007aece5ac732c1f53b0fc78ba9ba1 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sun, 20 Mar 2016 22:00:43 +0100 Subject: Merge pull request #444 from LemonBoy/timeout-id Use 0 as a sentinel value for sasl_timeout --- src/irc/core/sasl.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/irc/core/sasl.c b/src/irc/core/sasl.c index db099368..b74b6a8c 100644 --- a/src/irc/core/sasl.c +++ b/src/irc/core/sasl.c @@ -34,7 +34,7 @@ static gboolean sasl_timeout(IRC_SERVER_REC *server) irc_send_cmd_now(server, "AUTHENTICATE *"); cap_finish_negotiation(server); - server->sasl_timeout = -1; + server->sasl_timeout = 0; signal_emit("server sasl failure", 2, server, "The authentication timed out"); @@ -64,9 +64,9 @@ static void sasl_fail(IRC_SERVER_REC *server, const char *data, const char *from char *params, *error; /* Stop any pending timeout, if any */ - if (server->sasl_timeout != -1) { + if (server->sasl_timeout != 0) { g_source_remove(server->sasl_timeout); - server->sasl_timeout = -1; + server->sasl_timeout = 0; } params = event_get_params(data, 2, NULL, &error); @@ -81,9 +81,9 @@ static void sasl_fail(IRC_SERVER_REC *server, const char *data, const char *from static void sasl_already(IRC_SERVER_REC *server, const char *data, const char *from) { - if (server->sasl_timeout != -1) { + if (server->sasl_timeout != 0) { g_source_remove(server->sasl_timeout); - server->sasl_timeout = -1; + server->sasl_timeout = 0; } signal_emit("server sasl success", 1, server); @@ -94,9 +94,9 @@ static void sasl_already(IRC_SERVER_REC *server, const char *data, const char *f static void sasl_success(IRC_SERVER_REC *server, const char *data, const char *from) { - if (server->sasl_timeout != -1) { + if (server->sasl_timeout != 0) { g_source_remove(server->sasl_timeout); - server->sasl_timeout = -1; + server->sasl_timeout = 0; } signal_emit("server sasl success", 1, server); @@ -114,9 +114,9 @@ static void sasl_step(IRC_SERVER_REC *server, const char *data, const char *from conn = server->connrec; /* Stop the timer */ - if (server->sasl_timeout != -1) { + if (server->sasl_timeout != 0) { g_source_remove(server->sasl_timeout); - server->sasl_timeout = -1; + server->sasl_timeout = 0; } switch (conn->sasl_mechanism) { @@ -161,9 +161,9 @@ static void sasl_disconnected(IRC_SERVER_REC *server) return; } - if (server->sasl_timeout != -1) { + if (server->sasl_timeout != 0) { g_source_remove(server->sasl_timeout); - server->sasl_timeout = -1; + server->sasl_timeout = 0; } } -- cgit v1.2.3 From fe600dd5dc11c839c1fd90e77c4020c937e7c453 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Sun, 20 Mar 2016 22:06:41 +0100 Subject: Merge pull request #442 from LemonBoy/fix-435 Do not assume any default value for statusmsg. --- src/irc/core/irc-servers.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 81f0c269..1df95f70 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -78,17 +78,23 @@ static int ischannel_func(SERVER_REC *server, const char *data) IRC_SERVER_REC *irc_server = (IRC_SERVER_REC *) server; char *chantypes, *statusmsg; + g_return_val_if_fail(data != NULL, FALSE); + + /* empty string is no channel */ + if (*data == '\0') + return FALSE; + chantypes = g_hash_table_lookup(irc_server->isupport, "chantypes"); if (chantypes == NULL) chantypes = "#&!+"; /* normal, local, secure, modeless */ - statusmsg = g_hash_table_lookup(irc_server->isupport, "statusmsg"); - if (statusmsg == NULL) - statusmsg = "@+"; - while (strchr(statusmsg, *data) != NULL) - data++; + statusmsg = g_hash_table_lookup(irc_server->isupport, "statusmsg"); + if (statusmsg != NULL) + data += strspn(data, statusmsg); - return strchr(chantypes, *data) != NULL; + /* strchr(3) considers the trailing NUL as part of the string, make sure + * we didn't advance too much. */ + return *data != '\0' && strchr(chantypes, *data) != NULL; } static char **split_line(const SERVER_REC *server, const char *line, -- cgit v1.2.3 From 4a2ee3c34471c29b884f5b0bc2b6ad95b56f500b Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 22 Mar 2016 15:23:37 +0100 Subject: Merge pull request #446 from ailin-nemui/fix_445 strip less whitespace from commands --- src/fe-common/core/completion.c | 2 +- src/fe-common/core/fe-settings.c | 2 +- src/irc/dcc/dcc.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c index a4715d23..4461de92 100644 --- a/src/fe-common/core/completion.c +++ b/src/fe-common/core/completion.c @@ -757,7 +757,7 @@ static void cmd_completion(const char *data) int len; if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_OPTIONS | - PARAM_FLAG_GETREST | PARAM_FLAG_STRIP_TRAILING_WS, + PARAM_FLAG_GETREST, "completion", &optlist, &key, &value)) return; diff --git a/src/fe-common/core/fe-settings.c b/src/fe-common/core/fe-settings.c index 3bb43bf7..b689cbf9 100644 --- a/src/fe-common/core/fe-settings.c +++ b/src/fe-common/core/fe-settings.c @@ -109,7 +109,7 @@ static void cmd_set(char *data) SETTINGS_REC *rec; if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST | - PARAM_FLAG_OPTIONS | PARAM_FLAG_STRIP_TRAILING_WS, + PARAM_FLAG_OPTIONS, "set", &optlist, &key, &value)) return; diff --git a/src/irc/dcc/dcc.c b/src/irc/dcc/dcc.c index 7f35585e..17f6c477 100644 --- a/src/irc/dcc/dcc.c +++ b/src/irc/dcc/dcc.c @@ -496,8 +496,8 @@ static void cmd_dcc_close(char *data, IRC_SERVER_REC *server) g_return_if_fail(data != NULL); - if (!cmd_get_params(data, &free_arg, 3 | PARAM_FLAG_GETREST | - PARAM_FLAG_STRIP_TRAILING_WS, &typestr, &nick, &arg)) + if (!cmd_get_params(data, &free_arg, 3 | PARAM_FLAG_GETREST, + &typestr, &nick, &arg)) return; if (*nick == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); -- cgit v1.2.3 From c657b9c3b1bf867722f63892251b2294d6a87d56 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 22 Mar 2016 15:25:13 +0100 Subject: Merge pull request #447 from ailin-nemui/fix_dcc_help correct quoting in /help dcc --- docs/help/in/dcc.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/help/in/dcc.in b/docs/help/in/dcc.in index 649cb12b..dac31e58 100644 --- a/docs/help/in/dcc.in +++ b/docs/help/in/dcc.in @@ -36,10 +36,10 @@ %9Examples:%9 /DCC CHAT mike - /DCC GET bob 'summer vacation.mkv' - /DCC SEND sarah documents/resume.pdf + /DCC GET bob summer vacation.mkv + /DCC SEND sarah "summer vacation.mkv" /DCC CLOSE get mike - /DCC CLOSE send bob 'summer vacation.mkv' + /DCC CLOSE send bob summer vacation.mkv %9See also:%9 CD -- cgit v1.2.3 From 5ef2b958d94af940746f607fb56776852c6b0a4d Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 22 Mar 2016 22:57:28 +0100 Subject: Merge pull request #457 from ailin-nemui/fix_450 fix race condition in terminal init --- src/fe-text/terminfo-core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/fe-text/terminfo-core.c b/src/fe-text/terminfo-core.c index 60927f1a..4db68cc7 100644 --- a/src/fe-text/terminfo-core.c +++ b/src/fe-text/terminfo-core.c @@ -496,7 +496,7 @@ void terminfo_setup_colors(TERM_REC *term, int force) } } -static void terminfo_input_init(TERM_REC *term) +static void terminfo_input_init0(TERM_REC *term) { tcgetattr(fileno(term->in), &term->old_tio); memcpy(&term->tio, &term->old_tio, sizeof(term->tio)); @@ -518,8 +518,11 @@ static void terminfo_input_init(TERM_REC *term) term->tio.c_cc[VSUSP] = _POSIX_VDISABLE; #endif - tcsetattr(fileno(term->in), TCSADRAIN, &term->tio); +} +static void terminfo_input_init(TERM_REC *term) +{ + tcsetattr(fileno(term->in), TCSADRAIN, &term->tio); } static void terminfo_input_deinit(TERM_REC *term) @@ -673,6 +676,7 @@ static int term_setup(TERM_REC *term) term->beep = term->TI_bel ? _beep : _ignore; terminfo_setup_colors(term, FALSE); + terminfo_input_init0(term); terminfo_cont(term); return 1; } -- cgit v1.2.3 From 6572005d3d8071dc7faa1637986ed81692203e13 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 22 Mar 2016 22:54:43 +0100 Subject: Merge pull request #458 from ailin-nemui/fix_449 Properly toggle bracketed paste mode on stop/cont --- src/common.h | 2 +- src/fe-text/term-terminfo.c | 8 -------- src/fe-text/terminfo-core.c | 23 +++++++++++++++++++++++ src/fe-text/terminfo-core.h | 3 +++ 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/common.h b/src/common.h index 966e28d0..729049ab 100644 --- a/src/common.h +++ b/src/common.h @@ -6,7 +6,7 @@ #define IRSSI_GLOBAL_CONFIG "irssi.conf" /* config file name in /etc/ */ #define IRSSI_HOME_CONFIG "config" /* config file name in ~/.irssi/ */ -#define IRSSI_ABI_VERSION 1 +#define IRSSI_ABI_VERSION 2 #define DEFAULT_SERVER_ADD_PORT 6667 diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c index 3582b9e4..27be904e 100644 --- a/src/fe-text/term-terminfo.c +++ b/src/fe-text/term-terminfo.c @@ -710,11 +710,3 @@ void term_gets(GArray *buffer, int *line_count) } } } - -void term_set_bracketed_paste_mode(int enable) -{ - if (enable) - tputs("\e[?2004h", 0, term_putchar); - else - tputs("\e[?2004l", 0, term_putchar); -} diff --git a/src/fe-text/terminfo-core.c b/src/fe-text/terminfo-core.c index 4db68cc7..aa833abf 100644 --- a/src/fe-text/terminfo-core.c +++ b/src/fe-text/terminfo-core.c @@ -395,6 +395,14 @@ static void _ignore_parm(TERM_REC *term, int param) { } +static void term_dec_set_bracketed_paste_mode(int enable) +{ + if (enable) + tputs("\e[?2004h", 0, term_putchar); + else + tputs("\e[?2004l", 0, term_putchar); +} + static void term_fill_capabilities(TERM_REC *term) { int i, ival; @@ -538,6 +546,9 @@ void terminfo_cont(TERM_REC *term) if (term->TI_smkx) tput(tparm(term->TI_smkx)); + if (term->bracketed_paste_enabled) + term_dec_set_bracketed_paste_mode(TRUE); + terminfo_input_init(term); } @@ -548,6 +559,9 @@ void terminfo_stop(TERM_REC *term) /* move cursor to bottom of the screen */ terminfo_move(0, term->height-1); + if (term->bracketed_paste_enabled) + term_dec_set_bracketed_paste_mode(FALSE); + /* stop cup-mode */ if (term->TI_rmcup) tput(tparm(term->TI_rmcup)); @@ -681,6 +695,15 @@ static int term_setup(TERM_REC *term) return 1; } +void term_set_bracketed_paste_mode(int enable) +{ + if (current_term->bracketed_paste_enabled == enable) + return; + + current_term->bracketed_paste_enabled = enable; + term_dec_set_bracketed_paste_mode(enable); +} + TERM_REC *terminfo_core_init(FILE *in, FILE *out) { TERM_REC *old_term, *term; diff --git a/src/fe-text/terminfo-core.h b/src/fe-text/terminfo-core.h index 21398791..0ef280a1 100644 --- a/src/fe-text/terminfo-core.h +++ b/src/fe-text/terminfo-core.h @@ -92,6 +92,9 @@ struct _TERM_REC { /* Keyboard-transmit mode */ const char *TI_smkx; const char *TI_rmkx; + + /* Terminal mode states */ + int bracketed_paste_enabled; }; extern TERM_REC *current_term; -- cgit v1.2.3 From 6c0c0c60ad62e45664ee0c77ae3c926892de267c Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 22 Mar 2016 16:54:34 +0100 Subject: Make use of terminal application keys configurable adds a new setting term_appkey_mode which can enable or disable the use of keyboard transmit (application keys) mode. Fixes #430 --- src/fe-text/gui-readline.c | 2 ++ src/fe-text/term.h | 1 + src/fe-text/terminfo-core.c | 23 +++++++++++++++++++---- src/fe-text/terminfo-core.h | 1 + 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index 5acfaf60..af560894 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -1039,6 +1039,7 @@ static void setup_changed(void) paste_join_multiline = settings_get_bool("paste_join_multiline"); paste_use_bracketed_mode = settings_get_bool("paste_use_bracketed_mode"); + term_set_appkey_mode(settings_get_bool("term_appkey_mode")); /* Enable the bracketed paste mode on demand */ term_set_bracketed_paste_mode(paste_use_bracketed_mode); } @@ -1061,6 +1062,7 @@ void gui_readline_init(void) g_get_current_time(&last_keypress); input_listen_init(STDIN_FILENO); + settings_add_bool("lookandfeel", "term_appkey_mode", TRUE); settings_add_str("history", "scroll_page_count", "/2"); settings_add_time("misc", "paste_detect_time", "5msecs"); settings_add_bool("misc", "paste_use_bracketed_mode", FALSE); diff --git a/src/fe-text/term.h b/src/fe-text/term.h index 5f0a799e..9b726d82 100644 --- a/src/fe-text/term.h +++ b/src/fe-text/term.h @@ -94,6 +94,7 @@ void term_refresh(TERM_WINDOW *window); void term_stop(void); +void term_set_appkey_mode(int enable); void term_set_bracketed_paste_mode(int enable); /* keyboard input handling */ diff --git a/src/fe-text/terminfo-core.c b/src/fe-text/terminfo-core.c index aa833abf..15b00081 100644 --- a/src/fe-text/terminfo-core.c +++ b/src/fe-text/terminfo-core.c @@ -395,6 +395,12 @@ static void _ignore_parm(TERM_REC *term, int param) { } +static void terminfo_set_appkey_mode(TERM_REC *term, int set) +{ + if (term->TI_smkx && term->TI_rmkx) + tput(tparm(set ? term->TI_smkx : term->TI_rmkx)); +} + static void term_dec_set_bracketed_paste_mode(int enable) { if (enable) @@ -543,8 +549,8 @@ void terminfo_cont(TERM_REC *term) if (term->TI_smcup) tput(tparm(term->TI_smcup)); - if (term->TI_smkx) - tput(tparm(term->TI_smkx)); + if (term->appkey_enabled) + terminfo_set_appkey_mode(term, TRUE); if (term->bracketed_paste_enabled) term_dec_set_bracketed_paste_mode(TRUE); @@ -566,8 +572,8 @@ void terminfo_stop(TERM_REC *term) if (term->TI_rmcup) tput(tparm(term->TI_rmcup)); - if (term->TI_rmkx) - tput(tparm(term->TI_rmkx)); + if (term->appkey_enabled) + terminfo_set_appkey_mode(term, FALSE); /* reset input settings */ terminfo_input_deinit(term); @@ -695,6 +701,15 @@ static int term_setup(TERM_REC *term) return 1; } +void term_set_appkey_mode(int enable) +{ + if (current_term->appkey_enabled == enable) + return; + + current_term->appkey_enabled = enable; + terminfo_set_appkey_mode(current_term, enable); +} + void term_set_bracketed_paste_mode(int enable) { if (current_term->bracketed_paste_enabled == enable) diff --git a/src/fe-text/terminfo-core.h b/src/fe-text/terminfo-core.h index 0ef280a1..1253fd9d 100644 --- a/src/fe-text/terminfo-core.h +++ b/src/fe-text/terminfo-core.h @@ -94,6 +94,7 @@ struct _TERM_REC { const char *TI_rmkx; /* Terminal mode states */ + int appkey_enabled; int bracketed_paste_enabled; }; -- cgit v1.2.3 From c43831574187cdb2323d123702aa687af24664d8 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Wed, 23 Mar 2016 00:08:24 +0100 Subject: tag as 0.8.19 --- NEWS | 13 +++++++++++++ configure.ac | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e442a979..65aab5ed 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,16 @@ +v0.8.19 2016-03-23 The Irssi team + - Fixed regression when joining and parting channels on IRCnet (#435) + - Fixed SASL EXTERNAL (#432) + - Fixed regression when not using SASL (#438) + - Fixed incorrect SSL disconnects when using SSL from modules/scripts + (#439) + - Fixed regression where proxy_string could not be configured or + certain file transfers could not be accepted (#445) + - Fixed storing layout of !channels (#183) + - Fixed restoration of bracketed paste mode on quit (#449) + - Make the usage of meta-O for cursor keys configurable with + /set term_appkey_mode off + v0.8.18 2016-02-13 The Irssi team * Modules will now require to define a void MODULENAME ## _abicheck(int *version) diff --git a/configure.ac b/configure.ac index 44a986f2..b25e7286 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(irssi, 0.8.18a-head) +AC_INIT(irssi, 0.8.19) AC_CONFIG_SRCDIR([src]) AC_CONFIG_AUX_DIR(build-aux) AC_PREREQ(2.50) -- cgit v1.2.3