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
This commit is contained in:
ailin-nemui 2017-10-06 14:58:47 +02:00
commit 1fd285dccf
4 changed files with 183 additions and 27 deletions

View file

@ -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_