commit - 502911e55442a89602bd5681763f68250bff330b
commit + 580c8bbd4691218849c9a809acaa4c95f65cb846
blob - 693bdbd9a1e18e80d4399aeef8d4728ba90c7f86
blob + 2c972669645e8c2d760989263848c26a93432754
--- config.def.h
+++ config.def.h
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;
+/* alt screens */
+static bool allowaltscreen = true;
+
/* frames per second st should at maximum draw to the screen */
static unsigned int xfps = 60;
static unsigned int actionfps = 30;
blob - 1c100c09cb46d8089430c5efacca6954328fd90a
blob + fc7703d28f386b9f4887f1c0e8dd4c4bc0b52667
--- st.1
+++ st.1
st \- simple terminal
.SH SYNOPSIS
.B st
+.RB [ \-a ]
.RB [ \-c
.IR class ]
.RB [ \-f
is a simple terminal emulator.
.SH OPTIONS
.TP
+.B \-a
+disable alternate screens in terminal
+.TP
.BI \-c " class"
defines the window class (default $TERM).
.TP
blob - 8b1fc562be94f913df5f0df1b205ea74b8e82310
blob + 18935d4aac0f75133802b3681cfb3848e676b8e6
--- st.c
+++ st.c
#define USAGE \
"st " VERSION " (c) 2010-2013 st engineers\n" \
- "usage: st [-v] [-c class] [-f font] [-g geometry] [-o file]" \
+ "usage: st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]" \
" [-t title] [-w windowid] [-e command ...]\n"
/* XEMBED messages */
break;
case 1049: /* = 1047 and 1048 */
case 47:
- case 1047: {
+ case 1047:
+ if (!allowaltscreen)
+ break;
+
alt = IS_SET(MODE_ALTSCREEN);
if(alt) {
tclearregion(0, 0, term.col-1,
tswapscreen();
if(*args != 1049)
break;
- }
- /* pass through */
+ /* FALLTRU */
case 1048:
tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD);
break;
for(i = 1; i < argc; i++) {
switch(argv[i][0] != '-' || argv[i][2] ? -1 : argv[i][1]) {
+ case 'a':
+ allowaltscreen = false;
+ break;
case 'c':
if(++i < argc)
opt_class = argv[i];