diff options
author | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2012-11-13 20:04:34 +0100 |
---|---|---|
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2012-11-13 20:04:34 +0100 |
commit | 69ee3ba3a771ca60bc8738174c79fc851818a36b (patch) | |
tree | 7e2626d8012466682209f58798fc982f3c466092 /st.c | |
parent | 73177ba366e5363b8a6695882b52617a8909a925 (diff) | |
download | st-69ee3ba3a771ca60bc8738174c79fc851818a36b.tar.gz st-69ee3ba3a771ca60bc8738174c79fc851818a36b.tar.bz2 st-69ee3ba3a771ca60bc8738174c79fc851818a36b.zip |
Fix keypad mode and cursor mode
Keypad mode is used for detecting when keys in the auxiliary keypad are
pressed, while cursor mode is used for detecting when a cursor is pressed,
but they are different modes.
St was mixing both modes and DECPAM and DECPNM modified the cursor mode, and
this was incorrect.
---
st.c | 5 +++--
st.info | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -121,7 +121,8 @@ enum term_mode { MODE_REVERSE = 128, MODE_KBDLOCK = 256, MODE_HIDE = 512, - MODE_ECHO = 1024 + MODE_ECHO = 1024, + MODE_APPCURSOR = 2048 }; enum escape_state { @@ -1471,7 +1472,7 @@ tsetmode(bool priv, bool set, int *args, int narg) { switch(*args) { break; case 1: /* DECCKM -- Cursor key */ - MODBIT(term.mode, set, MODE_APPKEYPAD); + MODBIT(term.mode, set, MODE_APPCURSOR); break; case 5: /* DECSCNM -- Reverse video */ mode = term.mode; |