aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto E. Vargas Caballero <k0ga@shike2.com>2012-11-13 20:04:34 +0100
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2012-11-13 20:04:34 +0100
commit69ee3ba3a771ca60bc8738174c79fc851818a36b (patch)
tree7e2626d8012466682209f58798fc982f3c466092
parent73177ba366e5363b8a6695882b52617a8909a925 (diff)
downloadst-69ee3ba3a771ca60bc8738174c79fc851818a36b.tar.gz
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(-)
-rw-r--r--st.c5
-rw-r--r--st.info4
2 files changed, 5 insertions, 4 deletions
diff --git a/st.c b/st.c
index 8bf9337..683a0e9 100644
--- a/st.c
+++ b/st.c
@@ -121,7 +121,8 @@ enum term_mode {
121 MODE_REVERSE = 128, 121 MODE_REVERSE = 128,
122 MODE_KBDLOCK = 256, 122 MODE_KBDLOCK = 256,
123 MODE_HIDE = 512, 123 MODE_HIDE = 512,
124 MODE_ECHO = 1024 124 MODE_ECHO = 1024,
125 MODE_APPCURSOR = 2048
125}; 126};
126 127
127enum escape_state { 128enum escape_state {
@@ -1471,7 +1472,7 @@ tsetmode(bool priv, bool set, int *args, int narg) {
1471 switch(*args) { 1472 switch(*args) {
1472 break; 1473 break;
1473 case 1: /* DECCKM -- Cursor key */ 1474 case 1: /* DECCKM -- Cursor key */
1474 MODBIT(term.mode, set, MODE_APPKEYPAD); 1475 MODBIT(term.mode, set, MODE_APPCURSOR);
1475 break; 1476 break;
1476 case 5: /* DECSCNM -- Reverse video */ 1477 case 5: /* DECSCNM -- Reverse video */
1477 mode = term.mode; 1478 mode = term.mode;
diff --git a/st.info b/st.info
index 58e2139..63af234 100644
--- a/st.info
+++ b/st.info
@@ -89,7 +89,7 @@ st| simpleterm,
89 ritm=\E[23m, 89 ritm=\E[23m,
90 rmacs=\E(B, 90 rmacs=\E(B,
91 rmcup=\E[?1049l, 91 rmcup=\E[?1049l,
92# rmkx=\E>, 92 rmkx=\E[?1l\E>,
93 rmso=\E[23m, 93 rmso=\E[23m,
94 rmul=\E[m, 94 rmul=\E[m,
95 rs1=\Ec, 95 rs1=\Ec,
@@ -104,7 +104,7 @@ st| simpleterm,
104 sitm=\E[3m, 104 sitm=\E[3m,
105 smacs=\E(0, 105 smacs=\E(0,
106 smcup=\E[?1049h, 106 smcup=\E[?1049h,
107# smkx=\E=, 107 smkx=\E[?1h\E=,
108 smso=\E[3m, 108 smso=\E[3m,
109 smul=\E[4m, 109 smul=\E[4m,
110 tbc=\E[3g, 110 tbc=\E[3g,