Merge branch 'master' into cursor-blink

This commit is contained in:
Megan Rogge
2021-10-21 12:37:38 -05:00
committed by GitHub
104 changed files with 4864 additions and 990 deletions
+14 -1
View File
@@ -57,6 +57,14 @@ export class CursorRenderLayer extends BaseRenderLayer {
};
}
public dispose(): void {
if (this._cursorBlinkStateManager) {
this._cursorBlinkStateManager.dispose();
this._cursorBlinkStateManager = undefined;
}
super.dispose();
}
public resize(dim: IRenderDimensions): void {
super.resize(dim);
// Resizing the canvas discards the contents of the canvas so clear state
@@ -186,7 +194,12 @@ export class CursorRenderLayer extends BaseRenderLayer {
private _clearCursor(): void {
if (this._state) {
this._clearCells(this._state.x, this._state.y, this._state.width, 1);
// Avoid potential rounding errors when device pixel ratio is less than 1
if (window.devicePixelRatio < 1) {
this._clearAll();
} else {
this._clearCells(this._state.x, this._state.y, this._state.width, 1);
}
this._state = {
x: 0,
y: 0,