Merge branch 'master' into alexr00/ClearShouldClear
This commit is contained in:
+3
-1
@@ -50,6 +50,7 @@
|
|||||||
"start": "node demo/start",
|
"start": "node demo/start",
|
||||||
"start-zmodem": "node demo/zmodem/app",
|
"start-zmodem": "node demo/zmodem/app",
|
||||||
"lint": "tslint 'src/**/*.ts' './demo/**/*.ts'",
|
"lint": "tslint 'src/**/*.ts' './demo/**/*.ts'",
|
||||||
|
"pretest": "npm run layering",
|
||||||
"test": "npm run mocha",
|
"test": "npm run mocha",
|
||||||
"posttest": "npm run lint",
|
"posttest": "npm run lint",
|
||||||
"test-debug": "node --inspect-brk node_modules/.bin/gulp test",
|
"test-debug": "node --inspect-brk node_modules/.bin/gulp test",
|
||||||
@@ -64,6 +65,7 @@
|
|||||||
"coveralls": "nyc report --reporter=text-lcov | coveralls",
|
"coveralls": "nyc report --reporter=text-lcov | coveralls",
|
||||||
"webpack": "gulp webpack",
|
"webpack": "gulp webpack",
|
||||||
"watch": "concurrently --kill-others-on-fail --names \"lib,css\" \"tsc -w\" \"gulp watch-css\"",
|
"watch": "concurrently --kill-others-on-fail --names \"lib,css\" \"tsc -w\" \"gulp watch-css\"",
|
||||||
"watch-addons": "concurrently --kill-others-on-fail --names \"attach,fit,fullscreen,search,terminado,webLinks,winptyCompat,zmodem\" \"tsc -w -p ./src/addons/attach\" \"tsc -w -p ./src/addons/fit\" \"tsc -w -p ./src/addons/fullscreen\" \"tsc -w -p ./src/addons/search\" \"tsc -w -p ./src/addons/terminado\" \"tsc -w -p ./src/addons/webLinks\" \"tsc -w -p ./src/addons/winptyCompat\" \"tsc -w -p ./src/addons/zmodem\""
|
"watch-addons": "concurrently --kill-others-on-fail --names \"attach,fit,fullscreen,search,terminado,webLinks,winptyCompat,zmodem\" \"tsc -w -p ./src/addons/attach\" \"tsc -w -p ./src/addons/fit\" \"tsc -w -p ./src/addons/fullscreen\" \"tsc -w -p ./src/addons/search\" \"tsc -w -p ./src/addons/terminado\" \"tsc -w -p ./src/addons/webLinks\" \"tsc -w -p ./src/addons/winptyCompat\" \"tsc -w -p ./src/addons/zmodem\"",
|
||||||
|
"layering": "concurrently --kill-others-on-fail --names \"common,core\" \"tsc -p ./src/common\" \"tsc -p ./src/core\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,17 +4,20 @@
|
|||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
"es6",
|
"es5"
|
||||||
],
|
],
|
||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"outDir": "../../../lib/addons/fit/",
|
"outDir": "../../../lib/addons/fit/",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"preserveWatchOutput": true
|
"preserveWatchOutput": true,
|
||||||
|
"types": [
|
||||||
|
"../../node_modules/@types/mocha",
|
||||||
|
"../.."
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.ts",
|
"**/*.ts"
|
||||||
"../../../typings/xterm.d.ts"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,17 +4,20 @@
|
|||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
"es6",
|
"es5"
|
||||||
],
|
],
|
||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"outDir": "../../../lib/addons/fullscreen/",
|
"outDir": "../../../lib/addons/fullscreen/",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"preserveWatchOutput": true
|
"preserveWatchOutput": true,
|
||||||
|
"types": [
|
||||||
|
"../../node_modules/@types/mocha",
|
||||||
|
"../.."
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.ts",
|
"**/*.ts"
|
||||||
"../../../typings/xterm.d.ts"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import * as search from './search';
|
|||||||
import { SearchHelper } from './SearchHelper';
|
import { SearchHelper } from './SearchHelper';
|
||||||
import { ISearchOptions, ISearchResult } from './Interfaces';
|
import { ISearchOptions, ISearchResult } from './Interfaces';
|
||||||
|
|
||||||
|
|
||||||
class MockTerminalPlain {}
|
class MockTerminalPlain {}
|
||||||
|
|
||||||
class MockTerminal {
|
class MockTerminal {
|
||||||
@@ -16,7 +15,7 @@ class MockTerminal {
|
|||||||
public searchHelper: TestSearchHelper;
|
public searchHelper: TestSearchHelper;
|
||||||
public cols: number;
|
public cols: number;
|
||||||
constructor(options: any) {
|
constructor(options: any) {
|
||||||
this._core = new (require('../../../lib/Terminal').Terminal)(options);
|
this._core = new (require('../../../lib/Terminal')).Terminal(options);
|
||||||
this.searchHelper = new TestSearchHelper(this as any);
|
this.searchHelper = new TestSearchHelper(this as any);
|
||||||
this.cols = options.cols;
|
this.cols = options.cols;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,18 +3,23 @@
|
|||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"es5"
|
||||||
"es6",
|
|
||||||
],
|
],
|
||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"outDir": "../../../lib/addons/search/",
|
"outDir": "../../../lib/addons/search/",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"preserveWatchOutput": true
|
"preserveWatchOutput": true,
|
||||||
|
"types": [
|
||||||
|
"../../node_modules/@types/mocha",
|
||||||
|
"../.."
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.ts",
|
"**/*.ts"
|
||||||
"../../../typings/xterm.d.ts"
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/*.test.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,18 +3,20 @@
|
|||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"es5"
|
||||||
"es6",
|
|
||||||
],
|
],
|
||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"outDir": "../../../lib/addons/terminado/",
|
"outDir": "../../../lib/addons/terminado/",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"preserveWatchOutput": true
|
"preserveWatchOutput": true,
|
||||||
|
"types": [
|
||||||
|
"../../node_modules/@types/mocha",
|
||||||
|
"../.."
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.ts",
|
"**/*.ts"
|
||||||
"../../../typings/xterm.d.ts"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,17 +4,20 @@
|
|||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
"es6",
|
"es5",
|
||||||
],
|
],
|
||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"outDir": "../../../lib/addons/webLinks/",
|
"outDir": "../../../lib/addons/webLinks/",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"preserveWatchOutput": true
|
"preserveWatchOutput": true,
|
||||||
|
"types": [
|
||||||
|
"../../node_modules/@types/mocha",
|
||||||
|
"../.."
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.ts",
|
"**/*.ts"
|
||||||
"../../../typings/xterm.d.ts"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,18 +3,20 @@
|
|||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"es5"
|
||||||
"es6",
|
|
||||||
],
|
],
|
||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"outDir": "../../../lib/addons/winptyCompat/",
|
"outDir": "../../../lib/addons/winptyCompat/",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"preserveWatchOutput": true
|
"preserveWatchOutput": true,
|
||||||
|
"types": [
|
||||||
|
"../../node_modules/@types/mocha",
|
||||||
|
"../.."
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.ts",
|
"**/*.ts"
|
||||||
"../../../typings/xterm.d.ts"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,18 +3,20 @@
|
|||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"es5"
|
||||||
"es6",
|
|
||||||
],
|
],
|
||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"outDir": "../../../lib/addons/zmodem/",
|
"outDir": "../../../lib/addons/zmodem/",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"removeComments": true,
|
"removeComments": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"preserveWatchOutput": true
|
"preserveWatchOutput": true,
|
||||||
|
"types": [
|
||||||
|
"../../node_modules/@types/mocha",
|
||||||
|
"../.."
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.ts",
|
"**/*.ts"
|
||||||
"../../../typings/xterm.d.ts"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export class EventEmitter extends Disposable implements IEventEmitter, IDisposab
|
|||||||
super();
|
super();
|
||||||
// Restore the previous events if available, this will happen if the
|
// Restore the previous events if available, this will happen if the
|
||||||
// constructor is called multiple times on the same object (terminal reset).
|
// constructor is called multiple times on the same object (terminal reset).
|
||||||
this._events = this._events || {};
|
this._events = (<any>this)._events || {};
|
||||||
}
|
}
|
||||||
|
|
||||||
public on(type: string, listener: XtermListener): void {
|
public on(type: string, listener: XtermListener): void {
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5",
|
||||||
|
"lib": [
|
||||||
|
"es5"
|
||||||
|
],
|
||||||
|
"rootDir": ".",
|
||||||
|
"noEmit": true,
|
||||||
|
"strict": true,
|
||||||
|
"pretty": true,
|
||||||
|
"types": [
|
||||||
|
"../../node_modules/@types/mocha",
|
||||||
|
"../../"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"./**/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -10,12 +10,12 @@ import { ICharset } from '../Types';
|
|||||||
* to be represented within the terminal with only 8-bit encoding. See ISO 2022
|
* to be represented within the terminal with only 8-bit encoding. See ISO 2022
|
||||||
* for a discussion on character sets. Only VT100 character sets are supported.
|
* for a discussion on character sets. Only VT100 character sets are supported.
|
||||||
*/
|
*/
|
||||||
export const CHARSETS: { [key: string]: ICharset } = {};
|
export const CHARSETS: { [key: string]: ICharset | null } = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default character set, US.
|
* The default character set, US.
|
||||||
*/
|
*/
|
||||||
export const DEFAULT_CHARSET: ICharset = CHARSETS['B'];
|
export const DEFAULT_CHARSET: ICharset | null = CHARSETS['B'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DEC Special Character and Line Drawing Set.
|
* DEC Special Character and Line Drawing Set.
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
import { assert } from 'chai';
|
import { assert } from 'chai';
|
||||||
import { evaluateKeyboardEvent } from './Keyboard';
|
import { evaluateKeyboardEvent } from './Keyboard';
|
||||||
import { IKeyboardResult } from '../Types';
|
import { IKeyboardResult } from '../Types';
|
||||||
|
import { IKeyboardEvent } from '../../common/Types';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A helper function for testing which allows passing in a partial event and defaults will be filled
|
* A helper function for testing which allows passing in a partial event and defaults will be filled
|
||||||
@@ -20,12 +21,12 @@ function testEvaluateKeyboardEvent(partialEvent: {
|
|||||||
isMac?: boolean;
|
isMac?: boolean;
|
||||||
macOptionIsMeta?: boolean;
|
macOptionIsMeta?: boolean;
|
||||||
} = {}): IKeyboardResult {
|
} = {}): IKeyboardResult {
|
||||||
const event = {
|
const event: IKeyboardEvent = {
|
||||||
altKey: partialEvent.altKey || false,
|
altKey: partialEvent.altKey || false,
|
||||||
ctrlKey: partialEvent.ctrlKey || false,
|
ctrlKey: partialEvent.ctrlKey || false,
|
||||||
shiftKey: partialEvent.shiftKey || false,
|
shiftKey: partialEvent.shiftKey || false,
|
||||||
metaKey: partialEvent.metaKey || false,
|
metaKey: partialEvent.metaKey || false,
|
||||||
keyCode: partialEvent.keyCode !== undefined ? partialEvent.keyCode : undefined,
|
keyCode: partialEvent.keyCode !== undefined ? partialEvent.keyCode : 0,
|
||||||
key: partialEvent.key || '',
|
key: partialEvent.key || '',
|
||||||
type: partialEvent.type || ''
|
type: partialEvent.type || ''
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5",
|
||||||
|
"lib": [
|
||||||
|
"es5"
|
||||||
|
],
|
||||||
|
"rootDir": ".",
|
||||||
|
"noEmit": true,
|
||||||
|
"strict": true,
|
||||||
|
"pretty": true,
|
||||||
|
"types": [
|
||||||
|
"../../node_modules/@types/mocha",
|
||||||
|
"../../"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"./**/*",
|
||||||
|
"../common/**/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
Vendored
+2
@@ -7,6 +7,8 @@
|
|||||||
* to be stable and consumed by external programs.
|
* to be stable and consumed by external programs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/// <reference lib="dom"/>
|
||||||
|
|
||||||
declare module 'xterm' {
|
declare module 'xterm' {
|
||||||
/**
|
/**
|
||||||
* A string representing text font weight.
|
* A string representing text font weight.
|
||||||
|
|||||||
Reference in New Issue
Block a user