Browse Source

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.
master
q@c9x.me 11 years ago
committed by Roberto E. Vargas Caballero
parent
commit
b8d6171cb0
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      st.c

+ 3
- 0
st.c View File

@ -1855,7 +1855,10 @@ tsetmode(bool priv, bool set, int *args, int narg) {
MODBIT(term.mode, set, MODE_8BIT); MODBIT(term.mode, set, MODE_8BIT);
break; break;
case 1049: /* swap screen & set/restore cursor as xterm */ case 1049: /* swap screen & set/restore cursor as xterm */
if (!allowaltscreen)
break;
tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD);
/* FALLTHRU */
case 47: /* swap screen */ case 47: /* swap screen */
case 1047: case 1047:
if (!allowaltscreen) if (!allowaltscreen)


Loading…
Cancel
Save