15 Commits

Author SHA1 Message Date
Mitchell Hashimoto
853c0427e6 website: document srm mode 2023-10-12 19:38:06 -07:00
Mitchell Hashimoto
6a065540dd terminal: KAM (mode 2)
This has an associated config `vt-kam-allowed` which defaults to "false"
since this mode can cause the terminal to become mostly unusable. We
include this mode for completions sake however.
2023-10-12 17:07:47 -07:00
Mitchell Hashimoto
0c2bf94b13 Enable left/right margin support 2023-10-10 15:21:45 -07:00
Mitchell Hashimoto
f216609662 terminal: RIS should reset tabstops, ESC ? W should reset every 8
Fixes #648

Two issues here:

  - RIS should've been resetting the tabstops to every 8, but was
    clearing all tabstops.

  - `ESC ? W` should've reset tabstops to every 8, but was clearing
    all tabstops.
2023-10-10 09:02:22 -07:00
Mitchell Hashimoto
2354454907 terminal: set left and right margins, left and right margin mode 69 2023-10-09 21:20:15 -07:00
Mitchell Hashimoto
9c45c6a3d1 terminal: handle ansi vs dec mode
Previously, we just ignored ansi vs dec modes (`?`-prefix) and just
responded to both requests most of the time using the number as the
unique value. This _kind of works_ because almost all DEC modes do not
overlap with ANSI modes, but some overlap (i.e. `insert`, ANSI mode 4).

This commit properly separates ANSI vs DEC modes and updates all of our
terminal sequences to handle both (where applicable -- some sequences
are explicitly DEC-only).
2023-10-09 16:01:08 -07:00
Mitchell Hashimoto
d0b8bf7752 terminal: enable alternate scroll mode by default
Fixes #641

xterm does not so there is an argument to not doing this but a lot of
other terminals do. Having this on by default makes things like less
scroll with the mouse wheel by default which is nice to have.
2023-10-09 09:23:39 -07:00
Mitchell Hashimoto
d85baa4631 terminal: alternate scroll (mode 1007) should not be enabled by default 2023-10-07 14:26:11 -07:00
Mitchell Hashimoto
9e506ac7e1 terminal: cursor back handles reverse wrap (mode 45) 2023-10-06 08:35:02 -07:00
Mitchell Hashimoto
7fe1a61ae8 terminal: cursor back should reduce count if pending wrap is one 2023-10-06 07:52:15 -07:00
Mitchell Hashimoto
5f96adb993 terminal: mode 2027 2023-10-02 09:34:43 -07:00
Mitchell Hashimoto
d9cfd00e9f Big Cursor State Refactor
This makes a few major changes:

  - cursor style on terminal is single source of stylistic truth
  - cursor style is split between style and style request
  - cursor blinking is handled by the renderer thread
  - cursor style/visibility is no longer stored as persistent state on
    renderers
  - cursor style computation is extracted to be shared by all renderers
  - mode 12 "cursor_blinking" is now source of truth on whether blinking
    is enabled or not
  - CSI q and mode 12 are synced like xterm
2023-09-09 20:19:37 -07:00
Mitchell Hashimoto
2cc1e43716 termio: handle all the synchronized output setting, timer 2023-08-28 11:35:40 -07:00
Mitchell Hashimoto
716c343f07 terminal: ModeState can save/restore one set of modes 2023-08-15 08:43:25 -07:00
Mitchell Hashimoto
e467a48df0 terminal: working on new modes storage abstraction 2023-08-15 08:43:24 -07:00