From 47b6756ead38dbeb8453c4554d00085a4c0269dd Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 29 Jun 2019 18:57:59 -0700 Subject: [PATCH] isMSWindows -> isWindows --- src/Terminal.test.ts | 6 +++--- src/Terminal.ts | 2 +- src/Types.d.ts | 2 +- src/browser/services/SelectionService.test.ts | 4 ++-- src/browser/services/SelectionService.ts | 2 +- src/common/Platform.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Terminal.test.ts b/src/Terminal.test.ts index f454f5380a..f50b32a7aa 100644 --- a/src/Terminal.test.ts +++ b/src/Terminal.test.ts @@ -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; diff --git a/src/Terminal.ts b/src/Terminal.ts index b1a10d3fdd..f836011779 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -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; diff --git a/src/Types.d.ts b/src/Types.d.ts index 77541a0392..eaf6196b46 100644 --- a/src/Types.d.ts +++ b/src/Types.d.ts @@ -343,7 +343,7 @@ export interface IBrowser { isMac: boolean; isIpad: boolean; isIphone: boolean; - isMSWindows: boolean; + isWindows: boolean; } export interface ISoundManager { diff --git a/src/browser/services/SelectionService.test.ts b/src/browser/services/SelectionService.test.ts index 8a8807944b..fc9cafddc0 100644 --- a/src/browser/services/SelectionService.test.ts +++ b/src/browser/services/SelectionService.test.ts @@ -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'); }); }); diff --git a/src/browser/services/SelectionService.ts b/src/browser/services/SelectionService.ts index cfea0cc848..7fd821fb71 100644 --- a/src/browser/services/SelectionService.ts +++ b/src/browser/services/SelectionService.ts @@ -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; } diff --git a/src/common/Platform.ts b/src/common/Platform.ts index 87d466c01d..aae06c746f 100644 --- a/src/common/Platform.ts +++ b/src/common/Platform.ts @@ -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; /**