From 715d8fb0620058e143138997a108682eccdf267d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 26 Nov 2003 17:26:47 +0000 Subject: If pasted line starts with command char, treat it as command always. Paste detection can go on too easily with lagged connections. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3189 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/gui-readline.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index f87c6583..f205a9f8 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -151,14 +151,10 @@ static void paste_send(void) { unichar *arr; GString *str; - const char *signal_name; char out[10], *text; unsigned int i; arr = (unichar *) paste_buffer->data; - signal_name = active_win->active == NULL ? - "send command" : "send text"; - if (active_entry->text_len == 0) i = 0; else { @@ -174,7 +170,7 @@ static void paste_send(void) } text = gui_entry_get_text(active_entry); - signal_emit(signal_name, 3, text, + signal_emit("send command", 3, text, active_win->active_server, active_win->active); g_free(text); } @@ -183,7 +179,7 @@ static void paste_send(void) str = g_string_new(NULL); for (; i < paste_buffer->len; i++) { if (arr[i] == '\r' || arr[i] == '\n') { - signal_emit(signal_name, 3, str->str, + signal_emit("send command", 3, str->str, active_win->active_server, active_win->active); g_string_truncate(str, 0); -- cgit v1.2.3