aboutsummaryrefslogtreecommitdiff
path: root/vterm-module.h
diff options
context:
space:
mode:
authorJacob Vallejo <jake@jahkeup.com>2024-04-28 09:59:42 -0700
committerGabriele Bozzola <sbozzolator@gmail.com>2024-05-19 19:31:39 -0700
commitdf057b1af2bb89a1deb288086f13be296af42090 (patch)
tree099b57737ffec85f16222128d615bca9fe6c2cf2 /vterm-module.h
parentae4ae1aef2fcae98a37aad83f2a6aeeaeacedd4f (diff)
Support overriding SB_MAX at compile-time
This allows the user to select the scrollback buffer size via compiler preprocessor defines (instead of having to edit the source file) and falls back to the statically configured SB_MAX if the is no -DSB_MAX=$VALUE given. Signed-off-by: Jacob Vallejo <jake@jahkeup.com>
Diffstat (limited to 'vterm-module.h')
-rw-r--r--vterm-module.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/vterm-module.h b/vterm-module.h
index 1699cbc..ebf3624 100644
--- a/vterm-module.h
+++ b/vterm-module.h
@@ -23,7 +23,9 @@
VTERM_EXPORT int plugin_is_GPL_compatible;
+#ifndef SB_MAX
#define SB_MAX 100000 // Maximum 'scrollback' value.
+#endif
#ifndef MIN
#define MIN(X, Y) ((X) < (Y) ? (X) : (Y))