mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
isMSWindows -> isWindows
This commit is contained in:
@@ -634,10 +634,10 @@ describe('Terminal', () => {
|
||||
describe('On MS Windows', () => {
|
||||
let originalIsWindows: boolean;
|
||||
beforeEach(() => {
|
||||
originalIsWindows = term.browser.isMSWindows;
|
||||
term.browser.isMSWindows = true;
|
||||
originalIsWindows = term.browser.isWindows;
|
||||
term.browser.isWindows = true;
|
||||
});
|
||||
afterEach(() => term.browser.isMSWindows = originalIsWindows);
|
||||
afterEach(() => term.browser.isWindows = originalIsWindows);
|
||||
|
||||
it('should not interfere with the alt + ctrl key on keyDown', () => {
|
||||
evKeyPress.altKey = true;
|
||||
|
||||
+1
-1
@@ -1595,7 +1595,7 @@ export class Terminal extends Disposable implements ITerminal, IDisposable, IInp
|
||||
private _isThirdLevelShift(browser: IBrowser, ev: IKeyboardEvent): boolean {
|
||||
const thirdLevelKey =
|
||||
(browser.isMac && !this.options.macOptionIsMeta && ev.altKey && !ev.ctrlKey && !ev.metaKey) ||
|
||||
(browser.isMSWindows && ev.altKey && ev.ctrlKey && !ev.metaKey);
|
||||
(browser.isWindows && ev.altKey && ev.ctrlKey && !ev.metaKey);
|
||||
|
||||
if (ev.type === 'keypress') {
|
||||
return thirdLevelKey;
|
||||
|
||||
Vendored
+1
-1
@@ -343,7 +343,7 @@ export interface IBrowser {
|
||||
isMac: boolean;
|
||||
isIpad: boolean;
|
||||
isIphone: boolean;
|
||||
isMSWindows: boolean;
|
||||
isWindows: boolean;
|
||||
}
|
||||
|
||||
export interface ISoundManager {
|
||||
|
||||
@@ -13,7 +13,7 @@ import { IBufferService, IOptionsService } from 'common/services/Services';
|
||||
import { MockCharSizeService, MockMouseService } from 'browser/TestUtils.test';
|
||||
import { CellData } from 'common/buffer/CellData';
|
||||
import { IBuffer } from 'common/buffer/Types';
|
||||
import { isMSWindows } from '../../../out/common/Platform';
|
||||
import { isWindows } from '../../../out/common/Platform';
|
||||
|
||||
class TestSelectionService extends SelectionService {
|
||||
constructor(
|
||||
@@ -361,7 +361,7 @@ describe('SelectionService', () => {
|
||||
buffer.lines.set(4, stringToRow('5'));
|
||||
selectionService.selectAll();
|
||||
console.log(selectionService.selectionText.length);
|
||||
console.log(isMSWindows);
|
||||
console.log(isWindows);
|
||||
assert.equal(selectionService.selectionText, '1\n2\n3\n4\n5');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -231,7 +231,7 @@ export class SelectionService implements ISelectionService {
|
||||
// and joining the array into a multi-line string.
|
||||
const formattedResult = result.map(line => {
|
||||
return line.replace(ALL_NON_BREAKING_SPACE_REGEX, ' ');
|
||||
}).join(Browser.isMSWindows ? '\r\n' : '\n');
|
||||
}).join(Browser.isWindows ? '\r\n' : '\n');
|
||||
|
||||
return formattedResult;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export const isSafari = /^((?!chrome|android).)*safari/i.test(userAgent);
|
||||
export const isMac = contains(['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'], platform);
|
||||
export const isIpad = platform === 'iPad';
|
||||
export const isIphone = platform === 'iPhone';
|
||||
export const isMSWindows = contains(['Windows', 'Win16', 'Win32', 'WinCE'], platform);
|
||||
export const isWindows = contains(['Windows', 'Win16', 'Win32', 'WinCE'], platform);
|
||||
export const isLinux = platform.indexOf('Linux') >= 0;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user