diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-07-14 17:17:44 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-07-14 17:17:44 +0000 |
| commit | fcd989734235c25e64f8fb38ffcfdf381e933873 (patch) | |
| tree | baba5d2bae95311e70501c092266ba9ff1ec8146 /csi.c | |
| parent | Merge branch 'crash-on-runaway-url' (diff) | |
csi: invert the meaning of DECSDM
There has been some confusion whether enabling DECSDM (private mode
80) enables or disables sixel scrolling.
Foot currently enables scrolling when DECSDM is set, and this patch
changes this, such that setting DECSDM now *disables* scrolling.
The confusion is apparently due to a documentation error in the VT340
manual, as described in
https://github.com/dankamongmen/notcurses/issues/1782#issuecomment-863603641.
And that makes sense, in a way: the SDM in DECSDM stands for Sixel
Display Mode. I.e. it stands to reason that enabling that disables
scrolling.
Anyway, this lead to https://github.com/hackerb9/lsix/issues/41, where
it was eventually proven (by testing on a real VT340), that foot, and
a large number of other terminals (including XTerm) has it wrong:
https://github.com/hackerb9/lsix/issues/41#issuecomment-873269599.
Diffstat (limited to 'csi.c')
| -rw-r--r-- | csi.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -402,7 +402,7 @@ decset_decrst(struct terminal *term, unsigned param, bool enable) break; case 80: - term->sixel.scrolling = enable; + term->sixel.scrolling = !enable; break; case 1000: @@ -611,7 +611,7 @@ decrqm(const struct terminal *term, unsigned param, bool *enabled) case 12: *enabled = term->cursor_blink.decset; return true; case 25: *enabled = !term->hide_cursor; return true; case 45: *enabled = term->reverse_wrap; return true; - case 80: *enabled = term->sixel.scrolling; return true; + case 80: *enabled = !term->sixel.scrolling; return true; case 1000: *enabled = term->mouse_tracking == MOUSE_CLICK; return true; case 1001: *enabled = false; return true; case 1002: *enabled = term->mouse_tracking == MOUSE_DRAG; return true; @@ -654,7 +654,7 @@ xtsave(struct terminal *term, unsigned param) case 25: term->xtsave.show_cursor = !term->hide_cursor; break; case 45: term->xtsave.reverse_wrap = term->reverse_wrap; break; case 47: term->xtsave.alt_screen = term->grid == &term->alt; break; - case 80: term->xtsave.sixel_scrolling = term->sixel.scrolling; break; + case 80: term->xtsave.sixel_display_mode = !term->sixel.scrolling; break; case 1000: term->xtsave.mouse_click = term->mouse_tracking == MOUSE_CLICK; break; case 1001: break; case 1002: term->xtsave.mouse_drag = term->mouse_tracking == MOUSE_DRAG; break; @@ -696,7 +696,7 @@ xtrestore(struct terminal *term, unsigned param) case 25: enable = term->xtsave.show_cursor; break; case 45: enable = term->xtsave.reverse_wrap; break; case 47: enable = term->xtsave.alt_screen; break; - case 80: enable = term->xtsave.sixel_scrolling; break; + case 80: enable = term->xtsave.sixel_display_mode; break; case 1000: enable = term->xtsave.mouse_click; break; case 1001: return; case 1002: enable = term->xtsave.mouse_drag; break; |
