Comparing version 3.14.0-beta16 to 3.14.0-beta17
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var CircularList_1 = require("./common/CircularList"); | ||
var BufferLine_1 = require("./core/buffer/BufferLine"); | ||
var BufferReflow_1 = require("./BufferReflow"); | ||
var EventEmitter2_1 = require("./common/EventEmitter2"); | ||
var Lifecycle_1 = require("./common/Lifecycle"); | ||
var BufferReflow_1 = require("./core/buffer/BufferReflow"); | ||
var Marker_1 = require("./core/buffer/Marker"); | ||
exports.MAX_BUFFER_SIZE = 4294967295; | ||
@@ -424,3 +410,3 @@ var Buffer = (function () { | ||
var _this = this; | ||
var marker = new Marker(y); | ||
var marker = new Marker_1.Marker(y); | ||
this.markers.push(marker); | ||
@@ -458,33 +444,2 @@ marker.register(this.lines.onTrim(function (amount) { | ||
exports.Buffer = Buffer; | ||
var Marker = (function (_super) { | ||
__extends(Marker, _super); | ||
function Marker(line) { | ||
var _this = _super.call(this) || this; | ||
_this.line = line; | ||
_this._id = Marker._nextId++; | ||
_this.isDisposed = false; | ||
_this._onDispose = new EventEmitter2_1.EventEmitter2(); | ||
return _this; | ||
} | ||
Object.defineProperty(Marker.prototype, "id", { | ||
get: function () { return this._id; }, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(Marker.prototype, "onDispose", { | ||
get: function () { return this._onDispose.event; }, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Marker.prototype.dispose = function () { | ||
if (this.isDisposed) { | ||
return; | ||
} | ||
this.isDisposed = true; | ||
this._onDispose.fire(); | ||
}; | ||
Marker._nextId = 1; | ||
return Marker; | ||
}(Lifecycle_1.Disposable)); | ||
exports.Marker = Marker; | ||
var BufferStringIterator = (function () { | ||
@@ -491,0 +446,0 @@ function BufferStringIterator(_buffer, _trimRight, _startIndex, _endIndex, _startOverscan, _endOverscan) { |
@@ -0,1 +1,2 @@ | ||
import { IDisposable } from '../common/Types'; | ||
export declare const enum KeyboardResultType { | ||
@@ -76,1 +77,6 @@ SEND_KEY = 0, | ||
} | ||
export interface IMarker extends IDisposable { | ||
readonly id: number; | ||
readonly isDisposed: boolean; | ||
readonly line: number; | ||
} |
{ | ||
"name": "xterm", | ||
"description": "Full xterm terminal, in your browser", | ||
"version": "3.14.0-beta16", | ||
"version": "3.14.0-beta17", | ||
"main": "lib/public/Terminal.js", | ||
@@ -6,0 +6,0 @@ "types": "typings/xterm.d.ts", |
@@ -9,7 +9,5 @@ /** | ||
import { IBufferLine, ICellData, IAttributeData } from './core/Types'; | ||
import { IMarker } from 'xterm'; | ||
import { BufferLine, CellData, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_WIDTH, WHITESPACE_CELL_CODE, CHAR_DATA_WIDTH_INDEX, CHAR_DATA_CHAR_INDEX, DEFAULT_ATTR_DATA } from './core/buffer/BufferLine'; | ||
import { reflowLargerApplyNewLayout, reflowLargerCreateNewLayout, reflowLargerGetLinesToRemove, reflowSmallerGetNewLineLengths, getWrappedLineTrimmedLength } from './BufferReflow'; | ||
import { EventEmitter2, IEvent } from './common/EventEmitter2'; | ||
import { Disposable } from './common/Lifecycle'; | ||
import { reflowLargerApplyNewLayout, reflowLargerCreateNewLayout, reflowLargerGetLinesToRemove, reflowSmallerGetNewLineLengths, getWrappedLineTrimmedLength } from './core/buffer/BufferReflow'; | ||
import { Marker } from './core/buffer/Marker'; | ||
@@ -607,29 +605,2 @@ export const MAX_BUFFER_SIZE = 4294967295; // 2^32 - 1 | ||
export class Marker extends Disposable implements IMarker { | ||
private static _nextId = 1; | ||
private _id: number = Marker._nextId++; | ||
public isDisposed: boolean = false; | ||
public get id(): number { return this._id; } | ||
private _onDispose = new EventEmitter2<void>(); | ||
public get onDispose(): IEvent<void> { return this._onDispose.event; } | ||
constructor( | ||
public line: number | ||
) { | ||
super(); | ||
} | ||
public dispose(): void { | ||
if (this.isDisposed) { | ||
return; | ||
} | ||
this.isDisposed = true; | ||
// Emit before super.dispose such that dispose listeners get a change to react | ||
this._onDispose.fire(); | ||
} | ||
} | ||
/** | ||
@@ -636,0 +607,0 @@ * Iterator to get unwrapped content strings from the buffer. |
@@ -6,2 +6,4 @@ /** | ||
import { IDisposable } from '../common/Types'; | ||
export const enum KeyboardResultType { | ||
@@ -102,1 +104,7 @@ SEND_KEY, | ||
} | ||
export interface IMarker extends IDisposable { | ||
readonly id: number; | ||
readonly isDisposed: boolean; | ||
readonly line: number; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2755269
310
41782