mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 17:12:51 +02: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:
parent
e980500702
commit
2199b35892
1 changed files with 7 additions and 0 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue