X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=2919082c79a95b5320b8f231124fba5a6d39f897;hb=5d5a7c627a3709c3758c516de87609bb6b518e13;hp=5e7e4acdc3b7c2e1ab8aa3b676745a098c690ad2;hpb=27468403cc436cf8197c886158e6e61f24ae5b8d;p=st.git diff --git a/st.c b/st.c index 5e7e4ac..2919082 100644 --- a/st.c +++ b/st.c @@ -1459,6 +1459,7 @@ tsetscroll(int t, int b) { void tsetmode(bool priv, bool set, int *args, int narg) { int *lim, mode; + bool alt; for(lim = args + narg; args < lim; ++args) { if(priv) { @@ -1480,8 +1481,14 @@ tsetmode(bool priv, bool set, int *args, int narg) { case 7: /* DECAWM -- Auto wrap */ MODBIT(term.mode, set, MODE_WRAP); break; - case 8: /* DECARM -- Auto repeat (IGNORED) */ case 0: /* Error (IGNORED) */ + case 2: /* DECANM -- ANSI/VT52 (IGNORED) */ + case 3: /* DECCOLM -- Column (IGNORED) */ + case 4: /* DECSCLM -- Scroll (IGNORED) */ + case 8: /* DECARM -- Auto repeat (IGNORED) */ + case 18: /* DECPFF -- Printer feed (IGNORED) */ + case 19: /* DECPEX -- Printer extent (IGNORED) */ + case 42: /* DECNRCM -- National characters (IGNORED) */ case 12: /* att610 -- Start blinking cursor (IGNORED) */ break; case 25: /* DECTCEM -- Text Cursor Enable Mode */ @@ -1496,7 +1503,7 @@ tsetmode(bool priv, bool set, int *args, int narg) { case 1049: /* = 1047 and 1048 */ case 47: case 1047: { - bool alt = IS_SET(MODE_ALTSCREEN) != 0; + alt = IS_SET(MODE_ALTSCREEN) != 0; if(alt) tclearregion(0, 0, term.col-1, term.row-1); if(set ^ alt) /* set is always 1 or 0 */ @@ -1509,12 +1516,6 @@ tsetmode(bool priv, bool set, int *args, int narg) { tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); break; default: - /* case 2: DECANM -- ANSI/VT52 (NOT SUPPOURTED) */ - /* case 3: DECCOLM -- Column (NOT SUPPORTED) */ - /* case 4: DECSCLM -- Scroll (NOT SUPPORTED) */ - /* case 18: DECPFF -- Printer feed (NOT SUPPORTED) */ - /* case 19: DECPEX -- Printer extent (NOT SUPPORTED) */ - /* case 42: DECNRCM -- National characters (NOT SUPPORTED) */ fprintf(stderr, "erresc: unknown private set/reset mode %d\n", *args);