Skip to content

Commit

Permalink
Merge branch 'master' into project_references
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Mar 30, 2019
2 parents f80924f + 84d5963 commit 0960a7a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
5 changes: 4 additions & 1 deletion demo/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ Terminal.applyAddon(fit);
Terminal.applyAddon(fullscreen);
Terminal.applyAddon(search);
Terminal.applyAddon(webLinks);
Terminal.applyAddon(winptyCompat);
const isWindows = ['Windows', 'Win16', 'Win32', 'WinCE'].indexOf(navigator.platform) >= 0;
if (isWindows) {
Terminal.applyAddon(winptyCompat);
}


let term;
Expand Down
2 changes: 1 addition & 1 deletion src/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
*/
public focus(): void {
if (this.textarea) {
this.textarea.focus();
this.textarea.focus({ preventScroll: true });
}
}

Expand Down
6 changes: 0 additions & 6 deletions src/addons/winptyCompat/winptyCompat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ const WHITESPACE_CELL_CODE = 32;
export function winptyCompatInit(terminal: Terminal): void {
const addonTerminal = <IWinptyCompatAddonTerminal>terminal;

// Don't do anything when the platform is not Windows
const isWindows = ['Windows', 'Win16', 'Win32', 'WinCE'].indexOf(navigator.platform) >= 0;
if (!isWindows) {
return;
}

(addonTerminal._core as any).isWinptyCompatEnabled = true;

// Winpty does not support wraparound mode which means that lines will never
Expand Down
1 change: 1 addition & 0 deletions src/renderer/Renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export class Renderer extends EventEmitter implements IRenderer {
this._isPaused = entry.intersectionRatio === 0;
if (!this._isPaused && this._needsFullRefresh) {
this._terminal.refresh(0, this._terminal.rows - 1);
this._needsFullRefresh = false;
}
}

Expand Down

0 comments on commit 0960a7a

Please sign in to comment.