Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Fix SI and SO
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
2b4d52c
..
19e4379
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-2431,11
+2431,9
@@
tcontrolcode(uchar ascii) {
term.esc &= ~(ESC_CSI|ESC_ALTCHARSET|ESC_TEST);
term.esc |= ESC_START;
return;
term.esc &= ~(ESC_CSI|ESC_ALTCHARSET|ESC_TEST);
term.esc |= ESC_START;
return;
- case '\016': /* SO */
- term.charset = 0;
- return;
- case '\017': /* SI */
- term.charset = 1;
+ case '\016': /* SO (LS1 -- Locking shift 1) */
+ case '\017': /* SI (LS0 -- Locking shift 0) */
+ term.charset = 1 - (ascii - '\016');
return;
case '\032': /* SUB */
tsetchar(question, &term.c.attr, term.c.x, term.c.y);
return;
case '\032': /* SUB */
tsetchar(question, &term.c.attr, term.c.x, term.c.y);
@@
-3064,10
+3062,10
@@
xunloadfonts(void) {
xunloadfont(&dc.ibfont);
}
xunloadfont(&dc.ibfont);
}
-
void
xzoom(const Arg *arg) {
Arg larg;
void
xzoom(const Arg *arg) {
Arg larg;
+
larg.i = usedfontsize + arg->i;
xzoomabs(&larg);
}
larg.i = usedfontsize + arg->i;
xzoomabs(&larg);
}
@@
-3084,6
+3082,7
@@
xzoomabs(const Arg *arg) {
void
xzoomreset(const Arg *arg) {
Arg larg;
void
xzoomreset(const Arg *arg) {
Arg larg;
+
if(defaultfontsize > 0) {
larg.i = defaultfontsize;
xzoomabs(&larg);
if(defaultfontsize > 0) {
larg.i = defaultfontsize;
xzoomabs(&larg);