mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-21 07:32:54 +00:00
fontLigatures already defaulted to on, but the terminal never loaded the ligatures addon, so Fira Code and Maple Mono kept drawing != as two cells. Activate the addon after open and before WebGL, and rebuild the WebGL atlas when the setting changes so glyphs are not rasterized without the calt feature. The addon bundles lru-cache's node:diagnostics_channel import. Alias that builtin to a no-op channel in the Vite renderer build and in the Electron live-test bundles. Closes #3543
25 lines
564 B
TypeScript
25 lines
564 B
TypeScript
// @xterm/addon-ligatures bundles lru-cache, which imports
|
|
// node:diagnostics_channel for optional metrics. The renderer has no Node
|
|
// builtins. Nothing subscribes, so publish and tracePromise stay unused.
|
|
|
|
const silentChannel = {
|
|
hasSubscribers: false,
|
|
publish() {},
|
|
};
|
|
|
|
export function channel(): typeof silentChannel {
|
|
return silentChannel;
|
|
}
|
|
|
|
export function tracingChannel(): {
|
|
hasSubscribers: boolean;
|
|
tracePromise: () => Promise<void>;
|
|
} {
|
|
return {
|
|
hasSubscribers: false,
|
|
tracePromise() {
|
|
return Promise.resolve();
|
|
},
|
|
};
|
|
}
|