diff options
author | Timo Sirainen <cras@irssi.org> | 2001-12-11 20:31:45 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-12-11 20:31:45 +0000 |
commit | 5705e7b4f2d543e430469db14efb57cf9e48d82a (patch) | |
tree | 0c0c32f1b5bac85ab047e47ed53d48dbdad20884 /src | |
parent | 617123b5d414b9b44159d1fe2a0bc57b0f272f08 (diff) | |
download | irssi-5705e7b4f2d543e430469db14efb57cf9e48d82a.zip |
If window specific history was on and command changed a window, the command
was saved in wrong window's buffer.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2239 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-text/gui-readline.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index 44092f38..5b9504bc 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -146,6 +146,7 @@ void handle_key(int key) static void key_send_line(void) { + WINDOW_REC *history_window; char *str, *add_history; str = gui_entry_get_text(active_entry); @@ -154,6 +155,7 @@ static void key_send_line(void) /* we can't use gui_entry_get_text() later, since the entry might have been destroyed after we get back */ add_history = g_strdup(str); + history_window = active_win; translate_output(str); if (redir == NULL) { @@ -162,12 +164,14 @@ static void key_send_line(void) active_win->active); } else { if (redir->flags & ENTRY_REDIRECT_FLAG_HIDDEN) - g_free_and_null(add_history); + history_window = NULL; handle_entry_redirect(str); } if (add_history != NULL) { - command_history_add(active_win, add_history, FALSE); + if (history_window != NULL && + g_slist_find(windows, history_window) != NULL) + command_history_add(history_window, add_history, FALSE); g_free(add_history); } |