diff --git a/plugins/plugin-bash-like/src/pty/copy.ts b/plugins/plugin-bash-like/src/pty/copy.ts index 056d0d60c0f..b104ef9c319 100644 --- a/plugins/plugin-bash-like/src/pty/copy.ts +++ b/plugins/plugin-bash-like/src/pty/copy.ts @@ -117,8 +117,8 @@ export default function copy(terminal: Terminal): XtermResponse['rows'] { const nLines = lastFullLineIdx(terminal, current) + 1 let prevRow: XtermResponseCell[] - for (let idx = 0; idx < nLines; idx++) { - const line = terminal.buffer.active.getLine(idx) + for (let ridx = 0; ridx < nLines; ridx++) { + const line = terminal.buffer.active.getLine(ridx) if (line.isWrapped && prevRow !== undefined) { squashRow(line, previous, current, prevRow)