Files
infinite/node_modules/@xterm/xterm/src/common/services/CharsetService.ts
Haapy c3552d08b9 new additions : What's new
 Rust PTY backend (portable-pty)
     - pty_spawn / pty_write / pty_resize / pty_kill commands
     - Output streamed via pty:data Tauri events (base64-encoded bytes)
     - Spawns /bin/bash (falls back to /bin/bash), starts in /home/code
   xterm.js terminal card (full ANSI + true color)
   Toolbar (top-left) with + Note / + Terminal
   Shared useDragHandle hook (notes + terminals)
   Terminal font-size scales with canvas zoom → crisp at any zoom
   Terminal auto-refits when card resizes or zoom changes
2026-05-14 22:22:18 +00:00

35 lines
784 B
TypeScript

/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { ICharsetService } from 'common/services/Services';
import { ICharset } from 'common/Types';
export class CharsetService implements ICharsetService {
public serviceBrand: any;
public charset: ICharset | undefined;
public glevel: number = 0;
private _charsets: (ICharset | undefined)[] = [];
public reset(): void {
this.charset = undefined;
this._charsets = [];
this.glevel = 0;
}
public setgLevel(g: number): void {
this.glevel = g;
this.charset = this._charsets[g];
}
public setgCharset(g: number, charset: ICharset | undefined): void {
this._charsets[g] = charset;
if (this.glevel === g) {
this.charset = charset;
}
}
}