--- src/vte.c.org	2005-03-02 00:03:56.000000000 +0100
+++ src/vte.c	2005-03-02 01:18:29.000000000 +0100
@@ -15234,6 +15234,21 @@
 }
 
 /**
+ * vte_terminal_get_current_scrollback_lines:
+ * @terminal: a #VteTerminal
+ *
+ * Gets the current length of the scrollback buffer used by the terminal.  
+ *
+ */
+glong 
+vte_terminal_get_current_scrollback_lines(VteTerminal *terminal)
+{
+	g_return_val_if_fail(VTE_IS_TERMINAL(terminal), 0);
+  VteScreen *screen = &terminal->pvt->normal_screen;
+  return MAX(_vte_ring_length(screen->row_data), 1);
+}
+
+/**
  * vte_terminal_set_word_chars:
  * @terminal: a #VteTerminal
  * @spec: a specification
--- src/vte.h.org	2005-03-02 00:03:53.000000000 +0100
+++ src/vte.h	2005-03-02 00:16:48.000000000 +0100
@@ -280,6 +280,7 @@
 
 /* Set the number of scrollback lines, above or at an internal minimum. */
 void vte_terminal_set_scrollback_lines(VteTerminal *terminal, glong lines);
+glong vte_terminal_get_current_scrollback_lines(VteTerminal *terminal);
 
 /* Append the input method menu items to a given shell. */
 void vte_terminal_im_append_menuitems(VteTerminal *terminal,
