diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 59beeeb9..5ec6e6c7 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,8 @@ blank_issues_enabled: false contact_links: + - name: FAQ + url: https://github.com/xtermjs/xterm.js/wiki/FAQ + about: See our frequently asked questions before filing a bug report - name: Support / Q&A url: https://github.com/xtermjs/xterm.js/discussions/categories/q-a about: Use GitHub Discussions for community support and general Q&A diff --git a/src/browser/renderer/dom/DomRenderer.ts b/src/browser/renderer/dom/DomRenderer.ts index fe6cba2d..3135e9d2 100644 --- a/src/browser/renderer/dom/DomRenderer.ts +++ b/src/browser/renderer/dom/DomRenderer.ts @@ -53,7 +53,7 @@ export class DomRenderer extends Disposable implements IRenderer { @IOptionsService private readonly _optionsService: IOptionsService, @IBufferService private readonly _bufferService: IBufferService, @ICoreBrowserService private readonly _coreBrowserService: ICoreBrowserService, - @IThemeService themeService: IThemeService + @IThemeService private readonly _themeService: IThemeService ) { super(); this._rowContainer = document.createElement('div'); @@ -69,8 +69,8 @@ export class DomRenderer extends Disposable implements IRenderer { this._updateDimensions(); this.register(this._optionsService.onOptionChange(() => this._handleOptionsChanged())); - this.register(themeService.onChangeColors(e => this._injectCss(e))); - this._injectCss(themeService.colors); + this.register(this._themeService.onChangeColors(e => this._injectCss(e))); + this._injectCss(this._themeService.colors); this._rowFactory = instantiationService.createInstance(DomRendererRowFactory, document); @@ -340,6 +340,8 @@ export class DomRenderer extends Disposable implements IRenderer { private _handleOptionsChanged(): void { // Force a refresh this._updateDimensions(); + // Refresh CSS + this._injectCss(this._themeService.colors); } public clear(): void { diff --git a/src/browser/renderer/shared/TextureAtlas.ts b/src/browser/renderer/shared/TextureAtlas.ts index ce168465..0850e268 100644 --- a/src/browser/renderer/shared/TextureAtlas.ts +++ b/src/browser/renderer/shared/TextureAtlas.ts @@ -429,12 +429,12 @@ export class TextureAtlas implements ITextureAtlas { // Allow 1 cell width per character, with a minimum of 2 (CJK), plus some padding. This is used // to draw the glyph to the canvas as well as to restrict the bounding box search to ensure // giant ligatures (eg. =====>) don't impact overall performance. - const allowedWidth = this._config.deviceCellWidth * Math.max(chars.length, 2) + TMP_CANVAS_GLYPH_PADDING * 2; + const allowedWidth = Math.min(this._config.deviceCellWidth * Math.max(chars.length, 2) + TMP_CANVAS_GLYPH_PADDING * 2, this._textureSize); if (this._tmpCanvas.width < allowedWidth) { this._tmpCanvas.width = allowedWidth; } // Include line height when drawing glyphs - const allowedHeight = this._config.deviceCellHeight + TMP_CANVAS_GLYPH_PADDING * 4; + const allowedHeight = Math.min(this._config.deviceCellHeight + TMP_CANVAS_GLYPH_PADDING * 4, this._textureSize); if (this._tmpCanvas.height < allowedHeight) { this._tmpCanvas.height = allowedHeight; }