aboutsummaryrefslogtreecommitdiffhomepage
path: root/x.c
diff options
context:
space:
mode:
authorTimo Röhling <timo@gaussglocke.de>2024-02-01 05:27:58 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-02-03 16:08:49 +0300
commitd1443515a862307ef46f3d902f632655bc54997e (patch)
tree6bde81c7063a1399c6aab2cf608f0fb2e8347897 /x.c
parenta8a9fdc32ffc5ee6e3953322a48e0a8dbceff5a7 (diff)
downloadst-fork-d1443515a862307ef46f3d902f632655bc54997e.tar.gz
Terminal scrollback with ring buffer
This patch adds a ring buffer for scrollback to the terminal. The advantage of using a ring buffer is that the common case, scrolling with no static screen content, can be achieved very efficiently by incrementing and decrementing the starting line (modulo buffer size). The scrollback buffer is limited to HISTSIZE lines in order to bound memory usage. As the lines are allocated on demand, it is possible to implement unlimited scrollback with few changes. If the terminal is reset, the scroll back buffer is reset, too. Source: https://st.suckless.org/patches/scrollback/
Diffstat (limited to 'x.c')
-rw-r--r--x.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/x.c b/x.c
index 2131095..3759455 100644
--- a/x.c
+++ b/x.c
@@ -59,6 +59,8 @@ static void zoom(const Arg *);
static void zoomabs(const Arg *);
static void zoomreset(const Arg *);
static void ttysend(const Arg *);
+void kscrollup(const Arg *);
+void kscrolldown(const Arg *);
/* config.h for applying patches and the configuration. */
#include "config.h"