aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-01-19 18:52:57 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-03-31 11:16:43 +0000
commitf114068a468f6d6d39603b4ed26049de7b701842 (patch)
treed71a4f04bf945aeb4ac003267ad17577a60dc8db
parentci (woodpecker): do a second release build, using clang instead of gcc (diff)
csi: DECCOLM+DECSCLM: remove all support
We don’t support neither 132 column mode, nor smooth scrolling. Thus it makes little sense to recognize these control condes. Note that while XTerm does support 132 columns, it is disabled by default. In this mode, XTerm also doesn’t trigger the side-effects (i.e. clearing the screen). Closes #1265
-rw-r--r--CHANGELOG.md2
-rw-r--r--csi.c21
2 files changed, 2 insertions, 21 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4f1da5c1..d50eff6b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -139,6 +139,7 @@
* Crash when application output scrolls very fast, e.g. `yes`
([#1305][1305]).
* Crash when application scrolls **many** lines (> ~2³¹).
+* DECCOLM erasing the screen ([#1265][1265]).
[1173]: https://codeberg.org/dnkl/foot/issues/1173
[1190]: https://codeberg.org/dnkl/foot/issues/1190
@@ -151,6 +152,7 @@
[1280]: https://codeberg.org/dnkl/foot/issues/1280
[1288]: https://codeberg.org/dnkl/foot/issues/1288
[1305]: https://codeberg.org/dnkl/foot/issues/1305
+[1265]: https://codeberg.org/dnkl/foot/issues/1265
### Security
diff --git a/csi.c b/csi.c
index cef48d43..d22c1da5 100644
--- a/csi.c
+++ b/csi.c
@@ -276,21 +276,6 @@ decset_decrst(struct terminal *term, unsigned param, bool enable)
enable ? CURSOR_KEYS_APPLICATION : CURSOR_KEYS_NORMAL;
break;
- case 3:
- /* DECCOLM */
- if (enable)
- LOG_WARN("unimplemented: 132 column mode (DECCOLM)");
-
- term_erase(term, 0, 0, term->rows - 1, term->cols - 1);
- term_cursor_home(term);
- break;
-
- case 4:
- /* DECSCLM - Smooth scroll */
- if (enable)
- LOG_WARN("unimplemented: Smooth (Slow) Scroll (DECSCLM)");
- break;
-
case 5:
/* DECSCNM */
term->reverse = enable;
@@ -558,8 +543,6 @@ decrqm(const struct terminal *term, unsigned param)
{
switch (param) {
case 1: return decrpm(term->cursor_keys_mode == CURSOR_KEYS_APPLICATION);
- case 3: return DECRPM_PERMANENTLY_RESET;
- case 4: return DECRPM_PERMANENTLY_RESET;
case 5: return decrpm(term->reverse);
case 6: return decrpm(term->origin);
case 7: return decrpm(term->auto_margin);
@@ -601,8 +584,6 @@ xtsave(struct terminal *term, unsigned param)
{
switch (param) {
case 1: term->xtsave.application_cursor_keys = term->cursor_keys_mode == CURSOR_KEYS_APPLICATION; break;
- case 3: break;
- case 4: break;
case 5: term->xtsave.reverse = term->reverse; break;
case 6: term->xtsave.origin = term->origin; break;
case 7: term->xtsave.auto_margin = term->auto_margin; break;
@@ -644,8 +625,6 @@ xtrestore(struct terminal *term, unsigned param)
bool enable;
switch (param) {
case 1: enable = term->xtsave.application_cursor_keys; break;
- case 3: return;
- case 4: return;
case 5: enable = term->xtsave.reverse; break;
case 6: enable = term->xtsave.origin; break;
case 7: enable = term->xtsave.auto_margin; break;