Skip to content

Commit

Permalink
isMSWindows -> isWindows
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Jun 30, 2019
1 parent 79d8f05 commit 47b6756
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/Terminal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export interface IBrowser {
isMac: boolean;
isIpad: boolean;
isIphone: boolean;
isMSWindows: boolean;
isWindows: boolean;
}

export interface ISoundManager {
Expand Down
4 changes: 2 additions & 2 deletions src/browser/services/SelectionService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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');
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/browser/services/SelectionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/Platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down

0 comments on commit 47b6756

Please sign in to comment.