Disable command guide for large commands

This can come back after xtermjs/xterm.js#4911 is handled.

Fixes #199593
This commit is contained in:
Daniel Imms
2023-12-18 12:23:05 -08:00
parent d03d2fbb14
commit 0150b8d54f
@@ -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)