From 0150b8d54fec8f8ab9cbdb6d7dff40fa9bcb2e58 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon, 18 Dec 2023 12:23:05 -0800 Subject: [PATCH] Disable command guide for large commands This can come back after xtermjs/xterm.js#4911 is handled. Fixes #199593 --- .../contrib/terminal/browser/xterm/markNavigationAddon.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.ts b/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.ts index 1623830822a..499e1d2f57d 100644 --- a/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.ts +++ b/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.ts @@ -282,6 +282,11 @@ export class MarkNavigationAddon extends Disposable implements IMarkTracker, ITe } const startLine = command.marker.line - (command.getPromptRowCount() - 1); const decorationCount = toLineIndex(command.endMarker) - startLine; + // Abort if the command is too long, this limitation can be lifted when + // xtermjs/xterm.js#4911 is handled. + if (decorationCount > 200) { + return; + } for (let i = 0; i < decorationCount; i++) { const decoration = this._terminal.registerDecoration({ marker: this._createMarkerForOffset(startLine, i)