summaryrefslogtreecommitdiff
path: root/src/fe-text/gui-readline.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2003-11-17 13:23:22 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2003-11-17 13:23:22 +0000
commit8c717cd73b5b6c5765f24551fcfb9e6e8c09eb15 (patch)
tree447dc8cb1070a3a641046911a7e00ef7f18cb08b /src/fe-text/gui-readline.c
parent4d3d559f93abd3e9d326e8ad356fbb88a9a0487c (diff)
downloadirssi-8c717cd73b5b6c5765f24551fcfb9e6e8c09eb15.zip
When pasting to empty window, don't ask about if pasting was wanted or not.
Also paste them as commands, not as text to active (non-existing) channel/query. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3170 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/gui-readline.c')
-rw-r--r--src/fe-text/gui-readline.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c
index e94555a5..25cb8fe1 100644
--- a/src/fe-text/gui-readline.c
+++ b/src/fe-text/gui-readline.c
@@ -152,6 +152,7 @@ static void paste_send(void)
{
unichar *arr;
GString *str;
+ const char *signal_name;
char out[10], *text;
unsigned int i;
int lf;
@@ -175,8 +176,10 @@ static void paste_send(void)
return;
}
+ signal_name = active_win->active == NULL ? "send command" : "send text";
+
text = gui_entry_get_text(active_entry);
- signal_emit("send text", 3, text,
+ signal_emit(signal_name, 3, text,
active_win->active_server, active_win->active);
g_free(text);
@@ -184,7 +187,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("send text", 3, str->str,
+ signal_emit(signal_name, 3, str->str,
active_win->active_server,
active_win->active);
g_string_truncate(str, 0);
@@ -239,7 +242,8 @@ static gboolean paste_timeout(gpointer data)
return TRUE;
}
- if (paste_line_count < paste_verify_line_count) {
+ if (paste_line_count < paste_verify_line_count ||
+ active_win->active == NULL) {
/* paste without asking */
paste_flush(TRUE);
} else if (!paste_prompt) {