Merge branch 'master' into request_mode

This commit is contained in:
jerch
2022-09-03 13:32:27 +02:00
committed by GitHub
31 changed files with 100 additions and 90 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ export abstract class CoreTerminal extends Disposable implements ICoreTerminal {
public get cols(): number { return this._bufferService.cols; }
public get rows(): number { return this._bufferService.rows; }
public get buffers(): IBufferSet { return this._bufferService.buffers; }
public get options(): ITerminalOptions { return this.optionsService.options; }
public get options(): Required<ITerminalOptions> { return this.optionsService.options; }
public set options(options: ITerminalOptions) {
for (const key in options) {
this.optionsService.options[key] = options[key];
+2 -2
View File
@@ -121,8 +121,8 @@ export class MockLogService implements ILogService {
export class MockOptionsService implements IOptionsService {
public serviceBrand: any;
public readonly rawOptions: ITerminalOptions = clone(DEFAULT_OPTIONS);
public options: ITerminalOptions = this.rawOptions;
public readonly rawOptions: Required<ITerminalOptions> = clone(DEFAULT_OPTIONS);
public options: Required<ITerminalOptions> = this.rawOptions;
public onOptionChange: IEvent<string> = new EventEmitter<string>().event;
constructor(testOptions?: Partial<ITerminalOptions>) {
if (testOptions) {
+4 -4
View File
@@ -8,7 +8,7 @@ import { EventEmitter, IEvent } from 'common/EventEmitter';
import { isMac } from 'common/Platform';
import { CursorStyle } from 'common/Types';
export const DEFAULT_OPTIONS: Readonly<ITerminalOptions> = {
export const DEFAULT_OPTIONS: Readonly<Required<ITerminalOptions>> = {
cols: 80,
rows: 24,
cursorBlink: false,
@@ -46,7 +46,7 @@ export const DEFAULT_OPTIONS: Readonly<ITerminalOptions> = {
convertEol: false,
termName: 'xterm',
cancelEvents: false,
overviewRulerWidth: undefined
overviewRulerWidth: 0
};
const FONT_WEIGHT_OPTIONS: Extract<FontWeight, string>[] = ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'];
@@ -54,8 +54,8 @@ const FONT_WEIGHT_OPTIONS: Extract<FontWeight, string>[] = ['normal', 'bold', '1
export class OptionsService implements IOptionsService {
public serviceBrand: any;
public readonly rawOptions: ITerminalOptions;
public options: ITerminalOptions;
public readonly rawOptions: Required<ITerminalOptions>;
public options: Required<ITerminalOptions>;
private _onOptionChange = new EventEmitter<string>();
public get onOptionChange(): IEvent<string> { return this._onOptionChange.event; }
+37 -37
View File
@@ -194,8 +194,8 @@ export interface IOptionsService {
* single options without any validation as we trust TypeScript to enforce correct usage
* internally.
*/
readonly rawOptions: Readonly<ITerminalOptions>;
readonly options: ITerminalOptions;
readonly rawOptions: Required<ITerminalOptions>;
readonly options: Required<ITerminalOptions>;
readonly onOptionChange: IEvent<string>;
}
@@ -204,41 +204,41 @@ export type FontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '50
export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'off';
export interface ITerminalOptions {
allowProposedApi: boolean;
allowTransparency: boolean;
altClickMovesCursor: boolean;
cols: number;
convertEol: boolean;
cursorBlink: boolean;
cursorStyle: CursorStyle;
cursorWidth: number;
customGlyphs: boolean;
disableStdin: boolean;
drawBoldTextInBrightColors: boolean;
fastScrollModifier: 'alt' | 'ctrl' | 'shift' | undefined;
fastScrollSensitivity: number;
fontSize: number;
fontFamily: string;
fontWeight: FontWeight;
fontWeightBold: FontWeight;
letterSpacing: number;
lineHeight: number;
linkHandler: ILinkHandler | null;
logLevel: LogLevel;
macOptionIsMeta: boolean;
macOptionClickForcesSelection: boolean;
minimumContrastRatio: number;
rightClickSelectsWord: boolean;
rows: number;
screenReaderMode: boolean;
scrollback: number;
scrollSensitivity: number;
smoothScrollDuration: number;
tabStopWidth: number;
theme: ITheme;
windowsMode: boolean;
windowOptions: IWindowOptions;
wordSeparator: string;
allowProposedApi?: boolean;
allowTransparency?: boolean;
altClickMovesCursor?: boolean;
cols?: number;
convertEol?: boolean;
cursorBlink?: boolean;
cursorStyle?: CursorStyle;
cursorWidth?: number;
customGlyphs?: boolean;
disableStdin?: boolean;
drawBoldTextInBrightColors?: boolean;
fastScrollModifier?: 'none' | 'alt' | 'ctrl' | 'shift';
fastScrollSensitivity?: number;
fontSize?: number;
fontFamily?: string;
fontWeight?: FontWeight;
fontWeightBold?: FontWeight;
letterSpacing?: number;
lineHeight?: number;
linkHandler?: ILinkHandler | null;
logLevel?: LogLevel;
macOptionIsMeta?: boolean;
macOptionClickForcesSelection?: boolean;
minimumContrastRatio?: number;
rightClickSelectsWord?: boolean;
rows?: number;
screenReaderMode?: boolean;
scrollback?: number;
scrollSensitivity?: number;
smoothScrollDuration?: number;
tabStopWidth?: number;
theme?: ITheme;
windowsMode?: boolean;
windowOptions?: IWindowOptions;
wordSeparator?: string;
overviewRulerWidth?: number;
[key: string]: any;