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>
This commit is contained in:
co-authored by
Daniel Imms
parent
6ff26d2c7e
commit
eacf90b2b7
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
Reference in New Issue
Block a user