Skip to content

Commit

Permalink
Merge branch 'master' into reuse_bufferlines
Browse files Browse the repository at this point in the history
  • Loading branch information
jerch committed Nov 22, 2018
2 parents 2687fd0 + 6b89ec9 commit 2f453f9
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/addons/attach/attach.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @license MIT
*/

import { assert, expect } from 'chai';
import { assert } from 'chai';

import * as attach from './attach';

Expand Down
2 changes: 1 addition & 1 deletion src/addons/fit/fit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @license MIT
*/

import { assert, expect } from 'chai';
import { assert } from 'chai';

import * as fit from './fit';

Expand Down
2 changes: 1 addition & 1 deletion src/addons/fullscreen/fullscreen.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @license MIT
*/

import { assert, expect } from 'chai';
import { assert } from 'chai';

import * as fullscreen from './fullscreen';

Expand Down
11 changes: 6 additions & 5 deletions src/addons/fullscreen/fullscreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ import { Terminal } from 'xterm';
* @param fullscreen Toggle fullscreen on (true) or off (false)
*/
export function toggleFullScreen(term: Terminal, fullscreen: boolean): void {
let fn: string;
let fn: (...tokens: string[]) => void;

if (typeof fullscreen === 'undefined') {
fn = (term.element.classList.contains('fullscreen')) ? 'remove' : 'add';
fn = (term.element.classList.contains('fullscreen')) ?
term.element.classList.remove : term.element.classList.add;
} else if (!fullscreen) {
fn = 'remove';
fn = term.element.classList.remove;
} else {
fn = 'add';
fn = term.element.classList.add;
}

term.element.classList[fn]('fullscreen');
fn('fullscreen');
}

export function apply(terminalConstructor: typeof Terminal): void {
Expand Down
1 change: 1 addition & 0 deletions src/addons/search/search.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) 2018 The xterm.js authors. All rights reserved.
* @license MIT
*/
declare var require: any;

import { assert, expect } from 'chai';
import * as search from './search';
Expand Down
3 changes: 0 additions & 3 deletions src/addons/search/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,5 @@
},
"include": [
"**/*.ts"
],
"exclude": [
"**/*.test.ts"
]
}
2 changes: 1 addition & 1 deletion src/addons/terminado/terminado.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @license MIT
*/

import { assert, expect } from 'chai';
import { assert } from 'chai';

import * as terminado from './terminado';

Expand Down
2 changes: 1 addition & 1 deletion src/addons/webLinks/webLinks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @license MIT
*/

import { assert, expect } from 'chai';
import { assert } from 'chai';

import * as webLinks from './webLinks';

Expand Down
2 changes: 1 addition & 1 deletion src/addons/winptyCompat/winptyCompat.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @license MIT
*/

import { assert, expect } from 'chai';
import { assert } from 'chai';

import * as winptyCompat from './winptyCompat';

Expand Down
2 changes: 1 addition & 1 deletion src/addons/zmodem/zmodem.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @license MIT
*/

import { assert, expect } from 'chai';
import { assert } from 'chai';

import * as zmodem from './zmodem';

Expand Down
4 changes: 2 additions & 2 deletions src/addons/zmodem/zmodem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { Terminal } from 'xterm';
* via `detach()` and a re-`attach()`.)
*/

let zmodem;
let zmodem: any;

export interface IZmodemOptions {
noTerminalWriteOutsideSession?: boolean;
Expand All @@ -44,7 +44,7 @@ function zmodemAttach(ws: WebSocket, opts: IZmodemOptions = {}): void {
const term = this;
const senderFunc = (octets: ArrayLike<number>) => ws.send(new Uint8Array(octets));

let zsentry;
let zsentry: any;

function shouldWrite(): boolean {
return !!zsentry.get_confirmed_session() || !opts.noTerminalWriteOutsideSession;
Expand Down

0 comments on commit 2f453f9

Please sign in to comment.