summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2025-08-09 12:57:30 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2025-08-09 14:22:28 +0200
commit5a4666c19e3956069147aee43a06b326d998366e (patch)
treea3d67441ff62e2ac4a723147cd421548b5e2d9d4
parentSupport OSC 110, 111, and 112 for resetting colors (diff)
downloadst-5a4666c19e3956069147aee43a06b326d998366e.tar.gz
st-5a4666c19e3956069147aee43a06b326d998366e.zip
add a few comments
-rw-r--r--st.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/st.c b/st.c
index e9fea17..8e57991 100644
--- a/st.c
+++ b/st.c
@@ -1420,14 +1420,14 @@ tsetattr(const int *attr, int l)
1420 if ((idx = tdefcolor(attr, &i, l)) >= 0) 1420 if ((idx = tdefcolor(attr, &i, l)) >= 0)
1421 term.c.attr.fg = idx; 1421 term.c.attr.fg = idx;
1422 break; 1422 break;
1423 case 39: 1423 case 39: /* set foreground color to default */
1424 term.c.attr.fg = defaultfg; 1424 term.c.attr.fg = defaultfg;
1425 break; 1425 break;
1426 case 48: 1426 case 48:
1427 if ((idx = tdefcolor(attr, &i, l)) >= 0) 1427 if ((idx = tdefcolor(attr, &i, l)) >= 0)
1428 term.c.attr.bg = idx; 1428 term.c.attr.bg = idx;
1429 break; 1429 break;
1430 case 49: 1430 case 49: /* set background color to default */
1431 term.c.attr.bg = defaultbg; 1431 term.c.attr.bg = defaultbg;
1432 break; 1432 break;
1433 case 58: 1433 case 58:
@@ -1532,7 +1532,7 @@ tsetmode(int priv, int set, const int *args, int narg)
1532 case 1006: /* 1006: extended reporting mode */ 1532 case 1006: /* 1006: extended reporting mode */
1533 xsetmode(set, MODE_MOUSESGR); 1533 xsetmode(set, MODE_MOUSESGR);
1534 break; 1534 break;
1535 case 1034: 1535 case 1034: /* 1034: enable 8-bit mode for keyboard input */
1536 xsetmode(set, MODE_8BIT); 1536 xsetmode(set, MODE_8BIT);
1537 break; 1537 break;
1538 case 1049: /* swap screen & set/restore cursor as xterm */ 1538 case 1049: /* swap screen & set/restore cursor as xterm */
@@ -1540,8 +1540,8 @@ tsetmode(int priv, int set, const int *args, int narg)
1540 break; 1540 break;
1541 tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); 1541 tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD);
1542 /* FALLTHROUGH */ 1542 /* FALLTHROUGH */
1543 case 47: /* swap screen */ 1543 case 47: /* swap screen buffer */
1544 case 1047: 1544 case 1047: /* swap screen buffer */
1545 if (!allowaltscreen) 1545 if (!allowaltscreen)
1546 break; 1546 break;
1547 alt = IS_SET(MODE_ALTSCREEN); 1547 alt = IS_SET(MODE_ALTSCREEN);
@@ -1554,7 +1554,7 @@ tsetmode(int priv, int set, const int *args, int narg)
1554 if (*args != 1049) 1554 if (*args != 1049)
1555 break; 1555 break;
1556 /* FALLTHROUGH */ 1556 /* FALLTHROUGH */
1557 case 1048: 1557 case 1048: /* save/restore cursor (like DECSC/DECRC) */
1558 tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); 1558 tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD);
1559 break; 1559 break;
1560 case 2004: /* 2004: bracketed paste mode */ 1560 case 2004: /* 2004: bracketed paste mode */
@@ -1913,7 +1913,7 @@ strhandle(void)
1913 if (narg > 1) 1913 if (narg > 1)
1914 xsettitle(strescseq.args[1]); 1914 xsettitle(strescseq.args[1]);
1915 return; 1915 return;
1916 case 52: 1916 case 52: /* manipulate selection data */
1917 if (narg > 2 && allowwindowops) { 1917 if (narg > 2 && allowwindowops) {
1918 dec = base64dec(strescseq.args[2]); 1918 dec = base64dec(strescseq.args[2]);
1919 if (dec) { 1919 if (dec) {
@@ -1924,9 +1924,9 @@ strhandle(void)
1924 } 1924 }
1925 } 1925 }
1926 return; 1926 return;
1927 case 10: 1927 case 10: /* set dynamic VT100 text foreground color */
1928 case 11: 1928 case 11: /* set dynamic VT100 text background color */
1929 case 12: 1929 case 12: /* set dynamic text cursor color */
1930 if (narg < 2) 1930 if (narg < 2)
1931 break; 1931 break;
1932 p = strescseq.args[1]; 1932 p = strescseq.args[1];
@@ -1967,9 +1967,9 @@ strhandle(void)
1967 tfulldirt(); 1967 tfulldirt();
1968 } 1968 }
1969 return; 1969 return;
1970 case 110: 1970 case 110: /* reset dynamic VT100 text foreground color */
1971 case 111: 1971 case 111: /* reset dynamic VT100 text background color */
1972 case 112: 1972 case 112: /* reset dynamic text cursor color */
1973 if (narg != 1) 1973 if (narg != 1)
1974 break; 1974 break;
1975 if ((j = par - 110) < 0 || j >= LEN(osc_table)) 1975 if ((j = par - 110) < 0 || j >= LEN(osc_table))