mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
fix: ensure that currentRow can not go out of the range
This commit is contained in:
@@ -199,7 +199,9 @@ function bufferLine(
|
||||
let currentRow = startRow;
|
||||
let bufferStr = '';
|
||||
|
||||
while (currentCol !== endCol || currentRow !== endRow) {
|
||||
while ((currentCol !== endCol || currentRow !== endRow) &&
|
||||
currentRow >= 0 &&
|
||||
currentRow < bufferService.buffer.lines.length) {
|
||||
currentCol += forward ? 1 : -1;
|
||||
|
||||
if (forward && currentCol > bufferService.cols - 1) {
|
||||
|
||||
Reference in New Issue
Block a user