Merge branch 'master' into true_color

This commit is contained in:
Daniel Imms
2019-04-04 01:06:26 -04:00
committed by GitHub
17 changed files with 42 additions and 29 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ function runFakeTerminal(): void {
term.prompt(); term.prompt();
} else if (ev.keyCode === 8) { } else if (ev.keyCode === 8) {
// Do not delete the prompt // Do not delete the prompt
if (term.x > 2) { if (term._core.buffer.x > 2) {
term.write('\b \b'); term.write('\b \b');
} }
} else if (printable) { } else if (printable) {
+1 -1
View File
@@ -5,7 +5,7 @@
import * as Strings from './Strings'; import * as Strings from './Strings';
import { ITerminal, IBuffer } from './Types'; import { ITerminal, IBuffer } from './Types';
import { isMac } from './core/Platform'; import { isMac } from './common/Platform';
import { RenderDebouncer } from './ui/RenderDebouncer'; import { RenderDebouncer } from './ui/RenderDebouncer';
import { addDisposableDomListener } from './ui/Lifecycle'; import { addDisposableDomListener } from './ui/Lifecycle';
import { Disposable } from './common/Lifecycle'; import { Disposable } from './common/Lifecycle';
+1 -1
View File
@@ -896,7 +896,7 @@ export class InputHandler extends Disposable implements IInputHandler {
while (param--) { while (param--) {
buffer.lines.splice(buffer.ybase + buffer.scrollBottom, 1); buffer.lines.splice(buffer.ybase + buffer.scrollBottom, 1);
buffer.lines.splice(buffer.ybase + buffer.scrollBottom, 0, buffer.getBlankLine(DEFAULT_ATTR_DATA)); buffer.lines.splice(buffer.ybase + buffer.scrollTop, 0, buffer.getBlankLine(DEFAULT_ATTR_DATA));
} }
// this.maxRange(); // this.maxRange();
this._terminal.updateRange(buffer.scrollTop); this._terminal.updateRange(buffer.scrollTop);
+1 -1
View File
@@ -6,7 +6,7 @@
import { ITerminal, ISelectionManager, IBuffer, IBufferLine } from './Types'; import { ITerminal, ISelectionManager, IBuffer, IBufferLine } from './Types';
import { XtermListener } from './common/Types'; import { XtermListener } from './common/Types';
import { MouseHelper } from './ui/MouseHelper'; import { MouseHelper } from './ui/MouseHelper';
import * as Browser from './core/Platform'; import * as Browser from './common/Platform';
import { CharMeasure } from './ui/CharMeasure'; import { CharMeasure } from './ui/CharMeasure';
import { EventEmitter } from './common/EventEmitter'; import { EventEmitter } from './common/EventEmitter';
import { SelectionModel } from './SelectionModel'; import { SelectionModel } from './SelectionModel';
+1 -1
View File
@@ -36,7 +36,7 @@ import { Renderer } from './renderer/Renderer';
import { Linkifier } from './Linkifier'; import { Linkifier } from './Linkifier';
import { SelectionManager } from './SelectionManager'; import { SelectionManager } from './SelectionManager';
import { CharMeasure } from './ui/CharMeasure'; import { CharMeasure } from './ui/CharMeasure';
import * as Browser from './core/Platform'; import * as Browser from './common/Platform';
import { addDisposableDomListener } from './ui/Lifecycle'; import { addDisposableDomListener } from './ui/Lifecycle';
import * as Strings from './Strings'; import * as Strings from './Strings';
import { MouseHelper } from './ui/MouseHelper'; import { MouseHelper } from './ui/MouseHelper';
+1 -2
View File
@@ -3,8 +3,7 @@
* @license MIT * @license MIT
*/ */
import { XtermListener } from './Types'; import { IDisposable, IEventEmitter, XtermListener } from './Types';
import { IEventEmitter, IDisposable } from 'xterm';
import { Disposable } from './Lifecycle'; import { Disposable } from './Lifecycle';
export class EventEmitter extends Disposable implements IEventEmitter, IDisposable { export class EventEmitter extends Disposable implements IEventEmitter, IDisposable {
+1 -1
View File
@@ -3,7 +3,7 @@
* @license MIT * @license MIT
*/ */
import { IDisposable } from 'xterm'; import { IDisposable } from './Types';
/** /**
* A base class that can be extended to provide convenience methods for managing the lifecycle of an * A base class that can be extended to provide convenience methods for managing the lifecycle of an
@@ -3,6 +3,16 @@
* @license MIT * @license MIT
*/ */
interface INavigator {
userAgent: string;
language: string;
platform: string;
}
// We're declaring a navigator global here as we expect it in all runtimes (node and browser), but
// we want this module to live in common.
declare const navigator: INavigator;
const isNode = (typeof navigator === 'undefined') ? true : false; const isNode = (typeof navigator === 'undefined') ? true : false;
const userAgent = (isNode) ? 'node' : navigator.userAgent; const userAgent = (isNode) ? 'node' : navigator.userAgent;
const platform = (isNode) ? 'node' : navigator.platform; const platform = (isNode) ? 'node' : navigator.platform;
+10 -1
View File
@@ -3,7 +3,16 @@
* @license MIT * @license MIT
*/ */
import { IEventEmitter } from 'xterm'; export interface IDisposable {
dispose(): void;
}
export interface IEventEmitter {
on(type: string, listener: (...args: any[]) => void): void;
off(type: string, listener: (...args: any[]) => void): void;
emit(type: string, data?: any): void;
addDisposableListener(type: string, handler: (...args: any[]) => void): IDisposable;
}
export type XtermListener = (...args: any[]) => void; export type XtermListener = (...args: any[]) => void;
+5 -4
View File
@@ -1,9 +1,10 @@
{ {
"extends": "../tsconfig-library-base", "extends": "../tsconfig-library-base",
"compilerOptions": { "compilerOptions": {
"outDir": "../../lib" "outDir": "../../lib",
"types": [
"../../node_modules/@types/mocha"
]
}, },
"include": [ "include": [ "./**/*" ]
"./**/*"
]
} }
+5 -4
View File
@@ -1,11 +1,12 @@
{ {
"extends": "../tsconfig-library-base", "extends": "../tsconfig-library-base",
"compilerOptions": { "compilerOptions": {
"outDir": "../../lib" "outDir": "../../lib",
"types": [
"../../node_modules/@types/mocha"
]
}, },
"include": [ "include": [ "./**/*" ],
"./**/*"
],
"references": [ "references": [
{ "path": "../common" } { "path": "../common" }
] ]
+1 -1
View File
@@ -4,7 +4,7 @@
*/ */
import { FontWeight } from 'xterm'; import { FontWeight } from 'xterm';
import { isFirefox, isSafari } from '../../core/Platform'; import { isFirefox, isSafari } from '../../common/Platform';
import { IColor } from '../Types'; import { IColor } from '../Types';
import { ICharAtlasConfig, CHAR_ATLAS_CELL_SPACING } from './Types'; import { ICharAtlasConfig, CHAR_ATLAS_CELL_SPACING } from './Types';
+1 -1
View File
@@ -8,7 +8,7 @@ import BaseCharAtlas from './BaseCharAtlas';
import { DEFAULT_ANSI_COLORS } from '../ColorManager'; import { DEFAULT_ANSI_COLORS } from '../ColorManager';
import { clearColor } from './CharAtlasGenerator'; import { clearColor } from './CharAtlasGenerator';
import LRUMap from './LRUMap'; import LRUMap from './LRUMap';
import { isFirefox, isSafari } from '../../core/Platform'; import { isFirefox, isSafari } from '../../common/Platform';
import { IColor } from '../Types'; import { IColor } from '../Types';
// In practice we're probably never going to exhaust a texture this large. For debugging purposes, // In practice we're probably never going to exhaust a texture this large. For debugging purposes,
+1 -3
View File
@@ -8,8 +8,6 @@
"removeComments": true, "removeComments": true,
"pretty": true, "pretty": true,
"incremental": true, "incremental": true
"skipLibCheck": true
} }
} }
-4
View File
@@ -1,10 +1,6 @@
{ {
"extends": "./tsconfig-base.json", "extends": "./tsconfig-base.json",
"compilerOptions": { "compilerOptions": {
"types": [
"../../node_modules/@types/mocha",
"../../"
],
"composite": true, "composite": true,
"strict": true "strict": true
} }
+1 -2
View File
@@ -11,7 +11,7 @@
], ],
"rootDir": ".", "rootDir": ".",
"outDir": "../lib", "outDir": "../lib",
"noUnusedLocals": true, "noUnusedLocals": true,
"noImplicitAny": true "noImplicitAny": true
}, },
@@ -27,4 +27,3 @@
{ "path": "./core" } { "path": "./core" }
] ]
} }
+1 -1
View File
@@ -7,7 +7,7 @@ import { IColorSet, IRenderer, IRenderDimensions, IColorManager } from '../rende
import { IInputHandlingTerminal, IViewport, ICompositionHelper, ITerminal, IBuffer, IBufferSet, IBrowser, ICharMeasure, ISelectionManager, ITerminalOptions, ILinkifier, IMouseHelper, ILinkMatcherOptions, CharacterJoinerHandler, IBufferLine, IBufferStringIterator, ICellData, IAttributeData } from '../Types'; import { IInputHandlingTerminal, IViewport, ICompositionHelper, ITerminal, IBuffer, IBufferSet, IBrowser, ICharMeasure, ISelectionManager, ITerminalOptions, ILinkifier, IMouseHelper, ILinkMatcherOptions, CharacterJoinerHandler, IBufferLine, IBufferStringIterator, ICellData, IAttributeData } from '../Types';
import { ICircularList, XtermListener } from '../common/Types'; import { ICircularList, XtermListener } from '../common/Types';
import { Buffer } from '../Buffer'; import { Buffer } from '../Buffer';
import * as Browser from '../core/Platform'; import * as Browser from '../common/Platform';
import { ITheme, IDisposable, IMarker } from 'xterm'; import { ITheme, IDisposable, IMarker } from 'xterm';
import { Terminal } from '../Terminal'; import { Terminal } from '../Terminal';
import { AttributeData } from '../BufferLine'; import { AttributeData } from '../BufferLine';