mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 21:00:40 +02:00
Finally - /^msg nick never autocreates an empty window anymore. Added new
extern int command_hide_output which can be used to check if /^ was used. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2839 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
d1e55d91b7
commit
5cfaa5bb7a
5 changed files with 20 additions and 9 deletions
|
|
@ -50,11 +50,12 @@ static int ret_texts[] = {
|
|||
TXT_NOT_GOOD_IDEA
|
||||
};
|
||||
|
||||
int command_hide_output;
|
||||
|
||||
/* keep the whole command line here temporarily. we need it in
|
||||
"default command" event handler, but there we don't know if the start of
|
||||
the line had one or two command chars, and which one.. */
|
||||
static const char *current_cmdline;
|
||||
static int hide_output;
|
||||
|
||||
static GTimeVal time_command_last, time_command_now;
|
||||
static int last_command_cmd, command_cmd;
|
||||
|
|
@ -218,7 +219,7 @@ static void event_command(const char *data)
|
|||
cmdchar = strchr(settings_get_str("cmdchars"), *data);
|
||||
if (cmdchar != NULL && (data[1] == '^' ||
|
||||
(data[1] == *cmdchar && data[2] == '^'))) {
|
||||
hide_output = TRUE;
|
||||
command_hide_output = TRUE;
|
||||
signal_add_first("print starting", (SIGNAL_FUNC) sig_stop);
|
||||
signal_add_first("print format", (SIGNAL_FUNC) sig_stop);
|
||||
signal_add_first("print text", (SIGNAL_FUNC) sig_stop);
|
||||
|
|
@ -227,8 +228,8 @@ static void event_command(const char *data)
|
|||
|
||||
static void event_command_last(const char *data)
|
||||
{
|
||||
if (hide_output) {
|
||||
hide_output = FALSE;
|
||||
if (command_hide_output) {
|
||||
command_hide_output = FALSE;
|
||||
signal_remove("print starting", (SIGNAL_FUNC) sig_stop);
|
||||
signal_remove("print format", (SIGNAL_FUNC) sig_stop);
|
||||
signal_remove("print text", (SIGNAL_FUNC) sig_stop);
|
||||
|
|
@ -318,7 +319,7 @@ static void event_list_subcommands(const char *command)
|
|||
|
||||
void fe_core_commands_init(void)
|
||||
{
|
||||
hide_output = FALSE;
|
||||
command_hide_output = FALSE;
|
||||
|
||||
command_cmd = FALSE;
|
||||
memset(&time_command_now, 0, sizeof(GTimeVal));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue