diff options
| author | q@c9x.me <q@c9x.me> | 2014-04-09 20:37:23 +0200 |
|---|---|---|
| committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2014-04-15 08:13:41 +0200 |
| commit | b8d6171cb00c28e4c90e58e101554097003b59d3 (patch) | |
| tree | 4e7012dba8d976e1a322870d5d6c726af65e584c | |
| parent | ebb6e03201ce0e5a00be7cff2e365ad3d6cb7195 (diff) | |
| download | st-b8d6171cb00c28e4c90e58e101554097003b59d3.tar.gz st-b8d6171cb00c28e4c90e58e101554097003b59d3.zip | |
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.
| -rw-r--r-- | st.c | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -1855,7 +1855,10 @@ tsetmode(bool priv, bool set, int *args, int narg) { | |||
| 1855 | MODBIT(term.mode, set, MODE_8BIT); | 1855 | MODBIT(term.mode, set, MODE_8BIT); |
| 1856 | break; | 1856 | break; |
| 1857 | case 1049: /* swap screen & set/restore cursor as xterm */ | 1857 | case 1049: /* swap screen & set/restore cursor as xterm */ |
| 1858 | if (!allowaltscreen) | ||
| 1859 | break; | ||
| 1858 | tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); | 1860 | tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); |
| 1861 | /* FALLTHRU */ | ||
| 1859 | case 47: /* swap screen */ | 1862 | case 47: /* swap screen */ |
| 1860 | case 1047: | 1863 | case 1047: |
| 1861 | if (!allowaltscreen) | 1864 | if (!allowaltscreen) |
