mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge branch 'master' into project_references
This commit is contained in:
+4
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user