parent
decaa08e99
commit
62948ea6d8
|
@ -265,6 +265,7 @@ export class TerminalStickyScrollOverlay extends Disposable {
|
|||
const rowOffset = !isPartialCommand && command.endMarker ? Math.max(buffer.viewportY - command.endMarker.line + 1, 0) : 0;
|
||||
const maxLineCount = Math.min(this._rawMaxLineCount, Math.floor(xterm.rows * Constants.StickyScrollPercentageCap));
|
||||
const stickyScrollLineCount = Math.min(promptRowCount + commandRowCount - 1, maxLineCount) - rowOffset;
|
||||
const isTruncated = stickyScrollLineCount < promptRowCount + commandRowCount - 1;
|
||||
|
||||
// Hide sticky scroll if it's currently on a line that contains it
|
||||
if (buffer.viewportY <= stickyScrollLineStart) {
|
||||
|
@ -293,7 +294,7 @@ export class TerminalStickyScrollOverlay extends Disposable {
|
|||
start: stickyScrollLineStart + rowOffset,
|
||||
end: stickyScrollLineStart + rowOffset + Math.max(stickyScrollLineCount - 1, 0)
|
||||
}
|
||||
});
|
||||
}) + (isTruncated ? '\x1b[0m …' : '');
|
||||
|
||||
// If a partial command's sticky scroll would show nothing, just hide it. This is another
|
||||
// edge case when using a pager or interactive editor.
|
||||
|
|
Loading…
Reference in New Issue