From add0bbda50e91db31b8fcc2e97f2b2a3d04508f6 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 17 Nov 2003 00:01:17 +0000 Subject: [PATCH] initialize prev_entry git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3163 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/gui-readline.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index e495119f..1950e7b0 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -152,7 +152,7 @@ static void paste_send(void) { unichar *arr; GString *str; - char out[10]; + char out[10], *text; unsigned int i; int lf; @@ -175,8 +175,10 @@ static void paste_send(void) return; } - signal_emit("send text", 3, gui_entry_get_text(active_entry), + text = gui_entry_get_text(active_entry); + signal_emit("send text", 3, text, active_win->active_server, active_win->active); + g_free(text); /* rest of the lines */ str = g_string_new(NULL); @@ -877,10 +879,11 @@ void gui_readline_init(void) escape_next_key = FALSE; redir = NULL; + prev_entry = NULL; paste_state = 0; paste_entry = NULL; paste_entry_pos = 0; - paste_buffer = g_array_new(FALSE, FALSE, sizeof(unichar)); + paste_buffer = g_array_new(FALSE, FALSE, sizeof(unichar)); g_get_current_time(&last_keypress); input_listen_init(STDIN_FILENO);