Compare commits

...
Author SHA1 Message Date
Cursor AgentandDaniel Imms 9b1dbc2a71 docs: correct CSI t @vt support flags for Ps 14/16 and DECSLPP
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-26 20:30:17 +00:00
Cursor AgentandDaniel Imms be4b136e01 docs: add @vt documentation for CSI Ps t window manipulation
Document CSI Ps ; Ps t (window manipulation) in InputHandler.windowOptions
with @vt metadata so it appears in the supported sequences docs.

The entry notes that all Ps values are guarded by windowOptions (disabled
by default for security) and lists each Ps with its option flag and support.

Resolves xtermjs/xterm.js#5876

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-26 20:14:21 +00:00
+32 -25
View File
@@ -2904,32 +2904,39 @@ export class InputHandler extends Disposable implements IInputHandler {
/** /**
* CSI Ps ; Ps ; Ps t - Various window manipulations and reports (xterm) * CSI Ps ; Ps ; Ps t - Various window manipulations and reports (xterm)
* *
* Note: Only those listed below are supported. All others are left to integrators and * @vt: #P[Guarded by windowOptions; disabled by default for security. See below.] CSI WINMAN "Window Manipulation" "CSI Ps ; Ps t" "Various window manipulations and reports (xterm)."
* need special treatment based on the embedding environment.
* *
* Ps = 1 4 supported * All `Ps` values are guarded by the corresponding `windowOptions` setting and disabled by
* Report xterm text area size in pixels. * default for security (see `ITerminalOptions.windowOptions`). Custom `CSI t` handlers registered
* Result is CSI 4 ; height ; width t * via `registerCsiHandler` are subject to the same guard.
* Ps = 14 ; 2 not implemented *
* Ps = 16 supported * | Ps | Action | windowOptions | Support |
* Report xterm character cell size in pixels. * | --- | --- | --- | --- |
* Result is CSI 6 ; height ; width t * | 1 | De-iconify window | restoreWin | #P[No default implementation.] |
* Ps = 18 supported * | 2 | Iconify window | minimizeWin | #P[No default implementation.] |
* Report the size of the text area in characters. * | 3 | Move window to [x, y] | setWinPosition | #P[No default implementation.] |
* Result is CSI 8 ; height ; width t * | 4 | Resize window in pixels | setWinSizePixels | #P[No default implementation.] |
* Ps = 20 supported * | 5 | Raise window | raiseWin | #P[No default implementation.] |
* Report xterm window's icon label. * | 6 | Lower window | lowerWin | #P[No default implementation.] |
* Result is OSC L label ST * | 7 | Refresh window | refreshWin | #P[No default implementation.] |
* Ps = 21 supported * | 8 | Resize text area in characters | setWinSizeChars | #P[No default implementation.] |
* Report xterm window's title. * | 9 | Maximize window | maximizeWin | #P[No default implementation.] |
* Result is OSC l label ST * | 10 | Full-screen mode | fullscreenWin | #P[No default implementation.] |
* Ps = 22 ; 0 -> Save xterm icon and window title on stack. supported * | 11 | Report window state | getWinState | #P[No default implementation.] |
* Ps = 22 ; 1 -> Save xterm icon title on stack. supported * | 13 | Report window position | getWinPosition | #P[No default implementation.] |
* Ps = 22 ; 2 -> Save xterm window title on stack. supported * | 14 | Report text area size in pixels (`CSI 4 ; height ; width t`) | getWinSizePixels | #P[Browser only; requires render service.] |
* Ps = 23 ; 0 -> Restore xterm icon and window title from stack. supported * | 14 ; 2 | Report window size in pixels | getWinSizePixels | #N |
* Ps = 23 ; 1 -> Restore xterm icon title from stack. supported * | 15 | Report screen size in pixels | getScreenSizePixels | #P[No default implementation.] |
* Ps = 23 ; 2 -> Restore xterm window title from stack. supported * | 16 | Report cell size in pixels (`CSI 6 ; height ; width t`) | getCellSizePixels | #P[Browser only; requires render service.] |
* Ps >= 24 not implemented * | 18 | Report text area size in characters (`CSI 8 ; height ; width t`) | getWinSizeChars | #Y |
* | 19 | Report screen size in characters | getScreenSizeChars | #P[No default implementation.] |
* | 20 | Report icon title (OSC) | getIconTitle | #P[No default implementation.] |
* | 21 | Report window title (OSC) | getWinTitle | #P[No default implementation.] |
* | 22 | Push title(s) on stack | pushTitle | #Y |
* | 23 | Pop title(s) from stack | popTitle | #Y |
* | >= 24 | Resize to Ps lines (DECSLPP) | setWinLines | #N |
*
* Note: `setWinLines` also gates DECCOLM (`CSI ? 3 h/l`), see DECSET mode 3.
*/ */
public windowOptions(params: IParams): boolean { public windowOptions(params: IParams): boolean {
if (!paramToWindowOption(params.params[0], this._optionsService.rawOptions.windowOptions)) { if (!paramToWindowOption(params.params[0], this._optionsService.rawOptions.windowOptions)) {