1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

add pasted lines to command history

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3205 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2004-01-19 17:59:42 +00:00 committed by cras
parent e980500702
commit 2199b35892

View File

@ -149,6 +149,7 @@ static void window_next_page(void)
static void paste_send(void) static void paste_send(void)
{ {
HISTORY_REC *history;
unichar *arr; unichar *arr;
GString *str; GString *str;
char out[10], *text; char out[10], *text;
@ -170,6 +171,9 @@ static void paste_send(void)
} }
text = gui_entry_get_text(active_entry); text = gui_entry_get_text(active_entry);
history = command_history_current(active_win);
command_history_add(history, text);
signal_emit("send command", 3, text, signal_emit("send command", 3, text,
active_win->active_server, active_win->active); active_win->active_server, active_win->active);
g_free(text); g_free(text);
@ -179,6 +183,9 @@ static void paste_send(void)
str = g_string_new(NULL); str = g_string_new(NULL);
for (; i < paste_buffer->len; i++) { for (; i < paste_buffer->len; i++) {
if (arr[i] == '\r' || arr[i] == '\n') { if (arr[i] == '\r' || arr[i] == '\n') {
history = command_history_current(active_win);
command_history_add(history, str->str);
signal_emit("send command", 3, str->str, signal_emit("send command", 3, str->str,
active_win->active_server, active_win->active_server,
active_win->active); active_win->active);