aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/st.c b/st.c
index 8b1fc56..18935d4 100644
--- a/st.c
+++ b/st.c
@@ -43,7 +43,7 @@
43 43
44#define USAGE \ 44#define USAGE \
45 "st " VERSION " (c) 2010-2013 st engineers\n" \ 45 "st " VERSION " (c) 2010-2013 st engineers\n" \
46 "usage: st [-v] [-c class] [-f font] [-g geometry] [-o file]" \ 46 "usage: st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]" \
47 " [-t title] [-w windowid] [-e command ...]\n" 47 " [-t title] [-w windowid] [-e command ...]\n"
48 48
49/* XEMBED messages */ 49/* XEMBED messages */
@@ -1615,7 +1615,10 @@ tsetmode(bool priv, bool set, int *args, int narg) {
1615 break; 1615 break;
1616 case 1049: /* = 1047 and 1048 */ 1616 case 1049: /* = 1047 and 1048 */
1617 case 47: 1617 case 47:
1618 case 1047: { 1618 case 1047:
1619 if (!allowaltscreen)
1620 break;
1621
1619 alt = IS_SET(MODE_ALTSCREEN); 1622 alt = IS_SET(MODE_ALTSCREEN);
1620 if(alt) { 1623 if(alt) {
1621 tclearregion(0, 0, term.col-1, 1624 tclearregion(0, 0, term.col-1,
@@ -1625,8 +1628,7 @@ tsetmode(bool priv, bool set, int *args, int narg) {
1625 tswapscreen(); 1628 tswapscreen();
1626 if(*args != 1049) 1629 if(*args != 1049)
1627 break; 1630 break;
1628 } 1631 /* FALLTRU */
1629 /* pass through */
1630 case 1048: 1632 case 1048:
1631 tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); 1633 tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD);
1632 break; 1634 break;
@@ -3316,6 +3318,9 @@ main(int argc, char *argv[]) {
3316 3318
3317 for(i = 1; i < argc; i++) { 3319 for(i = 1; i < argc; i++) {
3318 switch(argv[i][0] != '-' || argv[i][2] ? -1 : argv[i][1]) { 3320 switch(argv[i][0] != '-' || argv[i][2] ? -1 : argv[i][1]) {
3321 case 'a':
3322 allowaltscreen = false;
3323 break;
3319 case 'c': 3324 case 'c':
3320 if(++i < argc) 3325 if(++i < argc)
3321 opt_class = argv[i]; 3326 opt_class = argv[i];