mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fix selection on bottom right char when mouse goes outside viewport
Part of #1029
This commit is contained in:
@@ -495,7 +495,7 @@ export class SelectionManager extends EventEmitter implements ISelectionManager
|
||||
// If the cursor was above or below the viewport, make sure it's at the
|
||||
// start or end of the viewport respectively.
|
||||
if (this._dragScrollAmount > 0) {
|
||||
this._model.selectionEnd[0] = this._terminal.cols - 1;
|
||||
this._model.selectionEnd[0] = this._terminal.cols;
|
||||
} else if (this._dragScrollAmount < 0) {
|
||||
this._model.selectionEnd[0] = 0;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ export class SelectionRenderLayer extends BaseRenderLayer {
|
||||
|
||||
// Draw final row
|
||||
if (viewportCappedStartRow !== viewportCappedEndRow) {
|
||||
// Only draw viewportEndRow if it's not the same as viewporttartRow
|
||||
// Only draw viewportEndRow if it's not the same as viewportStartRow
|
||||
const endCol = viewportEndRow === viewportCappedEndRow ? end[0] : terminal.cols;
|
||||
this.fillCells(0, viewportCappedEndRow, endCol, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user