mirror of
https://github.com/alrayyes/st.git
synced 2024-11-22 19:26:22 +00:00
Fix SI and SO
SI (0x0F or ^O) means Shift In, and it selects G1 charset definition, and SO (0x0E or ^N) means Shift Out, and it selects G0 charset definition, but st was doing just the inverse.
This commit is contained in:
parent
a7eef8f230
commit
0c8feecbf7
1 changed files with 3 additions and 5 deletions
8
st.c
8
st.c
|
@ -2431,11 +2431,9 @@ tcontrolcode(uchar ascii) {
|
||||||
term.esc &= ~(ESC_CSI|ESC_ALTCHARSET|ESC_TEST);
|
term.esc &= ~(ESC_CSI|ESC_ALTCHARSET|ESC_TEST);
|
||||||
term.esc |= ESC_START;
|
term.esc |= ESC_START;
|
||||||
return;
|
return;
|
||||||
case '\016': /* SO */
|
case '\016': /* SO (LS1 -- Locking shift 1) */
|
||||||
term.charset = 0;
|
case '\017': /* SI (LS0 -- Locking shift 0) */
|
||||||
return;
|
term.charset = 1 - (ascii - '\016');
|
||||||
case '\017': /* SI */
|
|
||||||
term.charset = 1;
|
|
||||||
return;
|
return;
|
||||||
case '\032': /* SUB */
|
case '\032': /* SUB */
|
||||||
tsetchar(question, &term.c.attr, term.c.x, term.c.y);
|
tsetchar(question, &term.c.attr, term.c.x, term.c.y);
|
||||||
|
|
Loading…
Reference in a new issue