[dev] [st] [PATCH] fix cursor handling when alt screen is disabled

From: <q_AT_c9x.me>
Date: Wed, 9 Apr 2014 20:37:23 +0200

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 == 1 usable.

---
 st.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/st.c b/st.c
index 392f12d..d002b15 100644
--- a/st.c
+++ b/st.c
_AT_@ -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)
-- 
1.9.1
Received on Wed Apr 09 2014 - 20:37:23 CEST

This archive was generated by hypermail 2.3.0 : Wed Apr 09 2014 - 20:48:06 CEST