all repos — st @ b8d6171cb00c28e4c90e58e101554097003b59d3

st (suckless terminal) config

fix cursor handling when alt screen is disabled

I don't like this alt screen thing, but when
allowaltscreen == 0, the cursor is still saved
and restored after calling 'less' (or 'man').

This patch makes allowaltscreen == 0 usable.
q@c9x.me q@c9x.me
commit

b8d6171cb00c28e4c90e58e101554097003b59d3

parent

ebb6e03201ce0e5a00be7cff2e365ad3d6cb7195

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M st.cst.c

@@ -1855,7 +1855,10 @@ case 1034:

MODBIT(term.mode, set, MODE_8BIT); break; case 1049: /* swap screen & set/restore cursor as xterm */ + if (!allowaltscreen) + break; tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); + /* FALLTHRU */ case 47: /* swap screen */ case 1047: if (!allowaltscreen)