summaryrefslogtreecommitdiff
path: root/src/fe-text
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2004-01-19 17:59:42 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2004-01-19 17:59:42 +0000
commit2199b3589266f42184bf922fd6a6f8d15974b532 (patch)
tree7a26411903347672adeb0ebe0cc0096b7ecdd5be /src/fe-text
parente980500702b420f0e01ce5aab9084c06594fe214 (diff)
downloadirssi-2199b3589266f42184bf922fd6a6f8d15974b532.zip
add pasted lines to command history
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3205 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text')
-rw-r--r--src/fe-text/gui-readline.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c
index f205a9f8..6c48c89c 100644
--- a/src/fe-text/gui-readline.c
+++ b/src/fe-text/gui-readline.c
@@ -149,6 +149,7 @@ static void window_next_page(void)
static void paste_send(void)
{
+ HISTORY_REC *history;
unichar *arr;
GString *str;
char out[10], *text;
@@ -170,6 +171,9 @@ static void paste_send(void)
}
text = gui_entry_get_text(active_entry);
+ history = command_history_current(active_win);
+ command_history_add(history, text);
+
signal_emit("send command", 3, text,
active_win->active_server, active_win->active);
g_free(text);
@@ -179,6 +183,9 @@ static void paste_send(void)
str = g_string_new(NULL);
for (; i < paste_buffer->len; i++) {
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,
active_win->active_server,
active_win->active);