diff --git a/src/addons/search/SearchHelper.ts b/src/addons/search/SearchHelper.ts index b32802de..3fbb71ef 100644 --- a/src/addons/search/SearchHelper.ts +++ b/src/addons/search/SearchHelper.ts @@ -19,7 +19,7 @@ export class SearchHelper implements ISearchHelper { /** * Find the next instance of the term, then scroll to and select it. If it * doesn't exist, do nothing. - * @param term Tne search term. + * @param term The search term. * @param searchOptions Search options. * @return Whether a result was found. */ @@ -61,7 +61,7 @@ export class SearchHelper implements ISearchHelper { /** * Find the previous instance of the term, then scroll to and select it. If it * doesn't exist, do nothing. - * @param term Tne search term. + * @param term The search term. * @param searchOptions Search options. * @return Whether a result was found. */ @@ -116,7 +116,7 @@ export class SearchHelper implements ISearchHelper { * subsequent terminal lines if the text is wrapped. If the provided line number is part of a wrapped text line that * started on an earlier line then it is skipped since it will be properly searched when the terminal line that the * text starts on is searched. - * @param term Tne search term. + * @param term The search term. * @param y The line to search. * @param searchOptions Search options. * @return The search result if it was found. diff --git a/src/addons/search/search.ts b/src/addons/search/search.ts index 9be0b33b..c274f28a 100644 --- a/src/addons/search/search.ts +++ b/src/addons/search/search.ts @@ -10,7 +10,7 @@ import { ISearchAddonTerminal, ISearchOptions } from './Interfaces'; /** * Find the next instance of the term, then scroll to and select it. If it * doesn't exist, do nothing. - * @param term Tne search term. + * @param term The search term. * @param searchOptions Search options * @return Whether a result was found. */ @@ -25,7 +25,7 @@ export function findNext(terminal: Terminal, term: string, searchOptions: ISearc /** * Find the previous instance of the term, then scroll to and select it. If it * doesn't exist, do nothing. - * @param term Tne search term. + * @param term The search term. * @param searchOptions Search options * @return Whether a result was found. */ diff --git a/src/renderer/atlas/DynamicCharAtlas.ts b/src/renderer/atlas/DynamicCharAtlas.ts index e67fe4f0..63336900 100644 --- a/src/renderer/atlas/DynamicCharAtlas.ts +++ b/src/renderer/atlas/DynamicCharAtlas.ts @@ -129,12 +129,17 @@ export default class DynamicCharAtlas extends BaseCharAtlas { return true; } + // Exit early for uncachable glyphs + if (!this._canCache(glyph)) { + return false; + } + const glyphKey = getGlyphCacheKey(glyph); const cacheValue = this._cacheMap.get(glyphKey); if (cacheValue !== null && cacheValue !== undefined) { this._drawFromCache(ctx, cacheValue, x, y); return true; - } else if (this._canCache(glyph) && this._drawToCacheCount < FRAME_CACHE_DRAW_LIMIT) { + } else if (this._drawToCacheCount < FRAME_CACHE_DRAW_LIMIT) { let index; if (this._cacheMap.size < this._cacheMap.capacity) { index = this._cacheMap.size;