@xterm/xterm 6.1.0-beta.197 → 6.1.0-beta.199
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/xterm.js +1 -1
- package/lib/xterm.js.map +1 -1
- package/lib/xterm.mjs +2 -2
- package/lib/xterm.mjs.map +2 -2
- package/package.json +2 -2
- package/src/browser/decorations/OverviewRulerRenderer.ts +18 -1
- package/src/browser/services/RenderService.ts +1 -1
- package/src/common/TaskQueue.ts +4 -0
- package/src/common/Version.ts +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xterm/xterm",
|
|
3
3
|
"description": "Full xterm terminal, in your browser",
|
|
4
|
-
"version": "6.1.0-beta.
|
|
4
|
+
"version": "6.1.0-beta.199",
|
|
5
5
|
"main": "lib/xterm.js",
|
|
6
6
|
"module": "lib/xterm.mjs",
|
|
7
7
|
"style": "css/xterm.css",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"ws": "^8.2.3",
|
|
120
120
|
"xterm-benchmark": "^0.3.1"
|
|
121
121
|
},
|
|
122
|
-
"commit": "
|
|
122
|
+
"commit": "0911688295fce79ba3b880e14af74f4f2718bef4"
|
|
123
123
|
}
|
|
@@ -94,6 +94,12 @@ export class OverviewRulerRenderer extends Disposable {
|
|
|
94
94
|
this._register(this._coreBrowserService.onDprChange(() => this._queueRefresh(true)));
|
|
95
95
|
this._register(this._optionsService.onSpecificOptionChange('scrollbar', () => this._queueRefresh(true)));
|
|
96
96
|
this._register(this._themeService.onChangeColors(() => this._queueRefresh()));
|
|
97
|
+
this._register(toDisposable(() => {
|
|
98
|
+
if (this._animationFrame !== undefined) {
|
|
99
|
+
this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame);
|
|
100
|
+
this._animationFrame = undefined;
|
|
101
|
+
}
|
|
102
|
+
}));
|
|
97
103
|
this._queueRefresh(true);
|
|
98
104
|
}
|
|
99
105
|
|
|
@@ -136,6 +142,9 @@ export class OverviewRulerRenderer extends Disposable {
|
|
|
136
142
|
}
|
|
137
143
|
|
|
138
144
|
private _refreshCanvasDimensions(): void {
|
|
145
|
+
if (this._store.isDisposed || !this._renderService.hasRenderer()) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
139
148
|
const cssCanvasHeight = this._renderService.dimensions.css.canvas.height;
|
|
140
149
|
const deviceCanvasHeight = this._renderService.dimensions.device.canvas.height;
|
|
141
150
|
this._canvas.style.width = `${this._width}px`;
|
|
@@ -147,6 +156,9 @@ export class OverviewRulerRenderer extends Disposable {
|
|
|
147
156
|
}
|
|
148
157
|
|
|
149
158
|
private _refreshDecorations(): void {
|
|
159
|
+
if (this._store.isDisposed || !this._renderService.hasRenderer()) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
150
162
|
if (this._shouldUpdateDimensions) {
|
|
151
163
|
this._refreshCanvasDimensions();
|
|
152
164
|
}
|
|
@@ -200,13 +212,18 @@ export class OverviewRulerRenderer extends Disposable {
|
|
|
200
212
|
}
|
|
201
213
|
|
|
202
214
|
private _queueRefresh(updateCanvasDimensions?: boolean, updateAnchor?: boolean): void {
|
|
215
|
+
if (this._store.isDisposed) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
203
218
|
this._shouldUpdateDimensions = updateCanvasDimensions || this._shouldUpdateDimensions;
|
|
204
219
|
this._shouldUpdateAnchor = updateAnchor || this._shouldUpdateAnchor;
|
|
205
220
|
if (this._animationFrame !== undefined) {
|
|
206
221
|
return;
|
|
207
222
|
}
|
|
208
223
|
this._animationFrame = this._coreBrowserService.window.requestAnimationFrame(() => {
|
|
209
|
-
this.
|
|
224
|
+
if (!this._store.isDisposed) {
|
|
225
|
+
this._refreshDecorations();
|
|
226
|
+
}
|
|
210
227
|
this._animationFrame = undefined;
|
|
211
228
|
});
|
|
212
229
|
}
|
|
@@ -68,7 +68,7 @@ export class RenderService extends Disposable implements IRenderService {
|
|
|
68
68
|
) {
|
|
69
69
|
super();
|
|
70
70
|
|
|
71
|
-
this._pausedResizeTask = new DebouncedIdleTask(this._logService);
|
|
71
|
+
this._pausedResizeTask = this._register(new DebouncedIdleTask(this._logService));
|
|
72
72
|
|
|
73
73
|
this._renderDebouncer = new RenderDebouncer((start, end) => this._renderRows(start, end), this._coreBrowserService);
|
|
74
74
|
this._register(this._renderDebouncer);
|
package/src/common/TaskQueue.ts
CHANGED
package/src/common/Version.ts
CHANGED