From 26128a3de2e86f7310489a749120d3cbfae46576 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 20 Nov 2001 02:08:37 +0000 Subject: [PATCH] Previous commit in core/commands.c broke /^cmd (command output hiding). git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2116 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/fe-core-commands.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/fe-core-commands.c b/src/fe-common/core/fe-core-commands.c index dc1f121c..7b59e58e 100644 --- a/src/fe-common/core/fe-core-commands.c +++ b/src/fe-common/core/fe-core-commands.c @@ -192,6 +192,12 @@ static void event_command(const char *data) { const char *cmdchar; + if (*data == '\0') { + /* empty line, forget it. */ + signal_stop(); + return; + } + /* save current command line */ current_cmdline = data; @@ -318,7 +324,7 @@ void fe_core_commands_init(void) command_bind_first("nick", NULL, (SIGNAL_FUNC) cmd_nick); command_bind_first("join", NULL, (SIGNAL_FUNC) cmd_join); - signal_add("send command", (SIGNAL_FUNC) event_command); + signal_add_first("send command", (SIGNAL_FUNC) event_command); signal_add_last("send command", (SIGNAL_FUNC) event_command_last); signal_add("default command", (SIGNAL_FUNC) event_default_command); signal_add("error command", (SIGNAL_FUNC) event_cmderror);