summaryrefslogtreecommitdiff
path: root/src/perl
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2017-10-06 14:58:47 +0200
committerailin-nemui <ailin-nemui@users.noreply.github.com>2017-10-06 14:58:47 +0200
commit1fd285dccfd43b740e88f7f4e168132387d39843 (patch)
treed267684a711264dde49a9480963cfac61027368b /src/perl
parent92dbb1895b84bc9412bea62ce11473daf4dd2618 (diff)
downloadirssi-1fd285dccfd43b740e88f7f4e168132387d39843.zip
refactor history to use history_entries list
this allows access to the global history even when a using /window history named or /set window_history on, and you want to recall something from one of the other windows' histories. usage (default): ctrl+up/down
Diffstat (limited to 'src/perl')
-rw-r--r--src/perl/ui/Window.xs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/perl/ui/Window.xs b/src/perl/ui/Window.xs
index 8c994cc2..b8d68ad8 100644
--- a/src/perl/ui/Window.xs
+++ b/src/perl/ui/Window.xs
@@ -252,8 +252,9 @@ PREINIT:
GList *tmp;
PPCODE:
rec = command_history_current(window);
- for (tmp = rec->list; tmp != NULL; tmp = tmp->next)
- XPUSHs(sv_2mortal(new_pv(tmp->data)));
+ for (tmp = command_history_list_first(rec); tmp != NULL; tmp = command_history_list_next(rec, tmp))
+ XPUSHs(sv_2mortal(new_pv(((HISTORY_ENTRY_REC *)tmp->data)->text)));
+
#*******************************
MODULE = Irssi::UI::Window PACKAGE = Irssi::Windowitem PREFIX = window_item_