mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
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
This commit is contained in:
parent
e75d58345e
commit
715d8fb062
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user