summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2009-01-17 22:33:29 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2009-01-17 22:33:29 +0000
commit508f8e1ddb7fe9ac299d2961d5ce057e857ab2da (patch)
tree2153300ed56d21645f9b436a4feebf2325499926
parent822e6caee88f70f18164743a856986cd85014334 (diff)
downloadirssi-508f8e1ddb7fe9ac299d2961d5ce057e857ab2da.zip
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
-rw-r--r--src/perl/ui/Window.xs11
1 files changed, 11 insertions, 0 deletions
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_
#*******************************