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(-)
This commit is contained in:
parent
73177ba366
commit
69ee3ba3a7
5
st.c
5
st.c
|
@ -121,7 +121,8 @@ enum term_mode {
|
||||||
MODE_REVERSE = 128,
|
MODE_REVERSE = 128,
|
||||||
MODE_KBDLOCK = 256,
|
MODE_KBDLOCK = 256,
|
||||||
MODE_HIDE = 512,
|
MODE_HIDE = 512,
|
||||||
MODE_ECHO = 1024
|
MODE_ECHO = 1024,
|
||||||
|
MODE_APPCURSOR = 2048
|
||||||
};
|
};
|
||||||
|
|
||||||
enum escape_state {
|
enum escape_state {
|
||||||
|
@ -1471,7 +1472,7 @@ tsetmode(bool priv, bool set, int *args, int narg) {
|
||||||
switch(*args) {
|
switch(*args) {
|
||||||
break;
|
break;
|
||||||
case 1: /* DECCKM -- Cursor key */
|
case 1: /* DECCKM -- Cursor key */
|
||||||
MODBIT(term.mode, set, MODE_APPKEYPAD);
|
MODBIT(term.mode, set, MODE_APPCURSOR);
|
||||||
break;
|
break;
|
||||||
case 5: /* DECSCNM -- Reverse video */
|
case 5: /* DECSCNM -- Reverse video */
|
||||||
mode = term.mode;
|
mode = term.mode;
|
||||||
|
|
4
st.info
4
st.info
|
@ -89,7 +89,7 @@ st| simpleterm,
|
||||||
ritm=\E[23m,
|
ritm=\E[23m,
|
||||||
rmacs=\E(B,
|
rmacs=\E(B,
|
||||||
rmcup=\E[?1049l,
|
rmcup=\E[?1049l,
|
||||||
# rmkx=\E>,
|
rmkx=\E[?1l\E>,
|
||||||
rmso=\E[23m,
|
rmso=\E[23m,
|
||||||
rmul=\E[m,
|
rmul=\E[m,
|
||||||
rs1=\Ec,
|
rs1=\Ec,
|
||||||
|
@ -104,7 +104,7 @@ st| simpleterm,
|
||||||
sitm=\E[3m,
|
sitm=\E[3m,
|
||||||
smacs=\E(0,
|
smacs=\E(0,
|
||||||
smcup=\E[?1049h,
|
smcup=\E[?1049h,
|
||||||
# smkx=\E=,
|
smkx=\E[?1h\E=,
|
||||||
smso=\E[3m,
|
smso=\E[3m,
|
||||||
smul=\E[4m,
|
smul=\E[4m,
|
||||||
tbc=\E[3g,
|
tbc=\E[3g,
|
||||||
|
|
Loading…
Reference in New Issue