[vte] Interpret and document negative number of scrollback lines as infinite
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vte] Interpret and document negative number of scrollback lines as infinite
- Date: Fri, 23 Oct 2009 22:38:54 +0000 (UTC)
commit 592ba42cbfa3e9e948226bcef832e7fd30f5fae7
Author: Behdad Esfahbod <behdad behdad org>
Date: Fri Oct 23 18:37:42 2009 -0400
Interpret and document negative number of scrollback lines as infinite
src/vte.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index f8eb3ad..5ae939f 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -12990,7 +12990,11 @@ vte_terminal_get_cursor_shape(VteTerminal *terminal)
* Sets the length of the scrollback buffer used by the terminal. The size of
* the scrollback buffer will be set to the larger of this value and the number
* of visible rows the widget can display, so 0 can safely be used to disable
- * scrollback. Note that this setting only affects the normal screen buffer.
+ * scrollback.
+ *
+ * A negative value means "infinite scrollback".
+ *
+ * Note that this setting only affects the normal screen buffer.
* For terminal types which have an alternate screen buffer, no scrollback is
* allowed on the alternate screen buffer.
*
@@ -13005,6 +13009,9 @@ vte_terminal_set_scrollback_lines(VteTerminal *terminal, glong lines)
g_return_if_fail(VTE_IS_TERMINAL(terminal));
+ if (lines < 0)
+ lines = G_MAXLONG;
+
object = G_OBJECT(terminal);
pvt = terminal->pvt;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]