st

simple terminal

git clone https://9o.is/git/st.git

commit f83030497aa293ca8d7b3002b51535e8d172ac3b
parent 0316fe96e83c5276059f3d554bcbbe46615aca01
Author: q@c9x.me <q@c9x.me>
Date:   Wed,  9 Apr 2014 20:37:23 +0200

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.

Diffstat:
Mst.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/st.c b/st.c @@ -1855,7 +1855,10 @@ tsetmode(bool priv, bool set, int *args, int narg) { 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)