From 508f8e1ddb7fe9ac299d2961d5ce057e857ab2da Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Sat, 17 Jan 2009 22:33:29 +0000 Subject: Add Irssi::UI::Window::get_history_lines to get the content of a window's history. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4993 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/perl/ui/Window.xs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/perl/ui/Window.xs b/src/perl/ui/Window.xs index ab52c910..ea3735a6 100644 --- a/src/perl/ui/Window.xs +++ b/src/perl/ui/Window.xs @@ -243,6 +243,17 @@ CODE: OUTPUT: RETVAL +void +window_get_history_lines(window) + Irssi::UI::Window window +PREINIT: + HISTORY_REC *rec; + GList *tmp; +PPCODE: + rec = command_history_current(window); + for (tmp = rec->list; tmp != NULL; tmp = tmp->next) + XPUSHs(sv_2mortal(new_pv(tmp->data))); + #******************************* MODULE = Irssi::UI::Window PACKAGE = Irssi::Windowitem PREFIX = window_item_ #******************************* -- cgit v1.2.3