Files
xterm.js/src/common/input/UnicodeProperties.ts
T
Cursor AgentandDaniel Imms eacf90b2b7 Split common into composite subprojects with project references
- common/tsconfig.json is a solution root referencing layer tsconfigs
- Each layer has composite tsconfig with correct references and outDir
- Break buffer/services cycle via buffer-local service interfaces
- Move cell types, keyboard/unicode types, TaskQueue, and TerminalOptions
- Exclude *.test.ts from composite builds; fix parser IDisposable imports

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
2026-05-30 17:32:03 +00:00

23 lines
718 B
TypeScript

/**
* Copyright (c) 2019 The xterm.js authors. All rights reserved.
* @license MIT
*/
import type { UnicodeCharProperties, UnicodeCharWidth } from 'common/input/UnicodeTypes';
export function extractShouldJoin(value: UnicodeCharProperties): boolean {
return (value & 1) !== 0;
}
export function extractWidth(value: UnicodeCharProperties): UnicodeCharWidth {
return ((value >> 1) & 0x3) as UnicodeCharWidth;
}
export function extractCharKind(value: UnicodeCharProperties): number {
return value >> 3;
}
export function createPropertyValue(state: number, width: number, shouldJoin: boolean = false): UnicodeCharProperties {
return ((state & 0xffffff) << 3) | ((width & 3) << 1) | (shouldJoin ? 1 : 0);
}