aboutsummaryrefslogtreecommitdiffhomepage
path: root/st.c
diff options
context:
space:
mode:
authorGravatar Christoph Lohmann <20h@r-36.net>2012-11-08 17:22:48 +0100
committerGravatar Christoph Lohmann <20h@r-36.net>2012-11-08 17:22:48 +0100
commit5d5a7c627a3709c3758c516de87609bb6b518e13 (patch)
treee86a474100a2e450314ea93a0710e8730f5791a3 /st.c
parent866590521609ba35606e53990e381bdc2adf742f (diff)
Moving the alt declaration to the beginning of the function.
Diffstat (limited to 'st.c')
-rw-r--r--st.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/st.c b/st.c
index 8059b16..2919082 100644
--- a/st.c
+++ b/st.c
@@ -1459,6 +1459,7 @@ tsetscroll(int t, int b) {
void
tsetmode(bool priv, bool set, int *args, int narg) {
int *lim, mode;
+ bool alt;
for(lim = args + narg; args < lim; ++args) {
if(priv) {
@@ -1502,7 +1503,7 @@ tsetmode(bool priv, bool set, int *args, int narg) {
case 1049: /* = 1047 and 1048 */
case 47:
case 1047: {
- bool alt = IS_SET(MODE_ALTSCREEN) != 0;
+ alt = IS_SET(MODE_ALTSCREEN) != 0;
if(alt)
tclearregion(0, 0, term.col-1, term.row-1);
if(set ^ alt) /* set is always 1 or 0 */