Fix rename clipboard selection for clarity
This commit is contained in:
@@ -17,7 +17,7 @@ import { DEFAULT_OPTIONS } from 'common/services/OptionsService';
|
||||
import { clone } from 'common/Clone';
|
||||
import { BufferService } from 'common/services/BufferService';
|
||||
import { CoreService } from 'common/services/CoreService';
|
||||
import { ClipboardSelection } from 'xterm';
|
||||
import { ClipboardSelectionType } from 'xterm';
|
||||
|
||||
function getCursor(bufferService: IBufferService): number[] {
|
||||
return [
|
||||
@@ -2003,62 +2003,62 @@ describe('InputHandler', () => {
|
||||
assert.deepEqual(stack, [
|
||||
{
|
||||
type: ClipboardEventType.SET,
|
||||
selection: ClipboardSelection.SYSTEM,
|
||||
selection: ClipboardSelectionType.SYSTEM,
|
||||
data: ''
|
||||
},
|
||||
{
|
||||
type: ClipboardEventType.SET,
|
||||
selection: ClipboardSelection.SYSTEM,
|
||||
selection: ClipboardSelectionType.SYSTEM,
|
||||
data: testDataRaw
|
||||
},
|
||||
{
|
||||
type: ClipboardEventType.SET,
|
||||
selection: ClipboardSelection.SYSTEM,
|
||||
selection: ClipboardSelectionType.SYSTEM,
|
||||
data: testDataB64
|
||||
},
|
||||
{
|
||||
type: ClipboardEventType.SET,
|
||||
selection: ClipboardSelection.SYSTEM,
|
||||
selection: ClipboardSelectionType.SYSTEM,
|
||||
data: testDataB64+'invalid'
|
||||
},
|
||||
{
|
||||
type: ClipboardEventType.SET,
|
||||
selection: ClipboardSelection.SYSTEM,
|
||||
selection: ClipboardSelectionType.SYSTEM,
|
||||
data: '!'
|
||||
},
|
||||
{
|
||||
type: ClipboardEventType.REPORT,
|
||||
selection: ClipboardSelection.SYSTEM,
|
||||
selection: ClipboardSelectionType.SYSTEM,
|
||||
data: '?'
|
||||
},
|
||||
{
|
||||
type: ClipboardEventType.SET,
|
||||
selection: ClipboardSelection.PRIMARY,
|
||||
selection: ClipboardSelectionType.PRIMARY,
|
||||
data: ''
|
||||
},
|
||||
{
|
||||
type: ClipboardEventType.SET,
|
||||
selection: ClipboardSelection.PRIMARY,
|
||||
selection: ClipboardSelectionType.PRIMARY,
|
||||
data: testDataRaw
|
||||
},
|
||||
{
|
||||
type: ClipboardEventType.SET,
|
||||
selection: ClipboardSelection.PRIMARY,
|
||||
selection: ClipboardSelectionType.PRIMARY,
|
||||
data: testDataB64
|
||||
},
|
||||
{
|
||||
type: ClipboardEventType.SET,
|
||||
selection: ClipboardSelection.PRIMARY,
|
||||
selection: ClipboardSelectionType.PRIMARY,
|
||||
data: testDataB64+'invalid'
|
||||
},
|
||||
{
|
||||
type: ClipboardEventType.SET,
|
||||
selection: ClipboardSelection.PRIMARY,
|
||||
selection: ClipboardSelectionType.PRIMARY,
|
||||
data: '!'
|
||||
},
|
||||
{
|
||||
type: ClipboardEventType.REPORT,
|
||||
selection: ClipboardSelection.PRIMARY,
|
||||
selection: ClipboardSelectionType.PRIMARY,
|
||||
data: '?'
|
||||
}
|
||||
]);
|
||||
|
||||
@@ -22,7 +22,7 @@ import { OscHandler } from 'common/parser/OscParser';
|
||||
import { DcsHandler } from 'common/parser/DcsParser';
|
||||
import { IBuffer } from 'common/buffer/Types';
|
||||
import { parseColor } from 'common/input/XParseColor';
|
||||
import { ClipboardSelection } from 'xterm';
|
||||
import { ClipboardSelectionType } from 'xterm';
|
||||
|
||||
/**
|
||||
* Map collect to glevel. Used in `selectCharset`.
|
||||
@@ -3099,8 +3099,8 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
return true;
|
||||
}
|
||||
switch (pc) {
|
||||
case ClipboardSelection.SYSTEM:
|
||||
case ClipboardSelection.PRIMARY:
|
||||
case ClipboardSelectionType.SYSTEM:
|
||||
case ClipboardSelectionType.PRIMARY:
|
||||
this._onClipboard.fire({
|
||||
type: pd === '?' ? ClipboardEventType.REPORT : ClipboardEventType.SET,
|
||||
selection: pc,
|
||||
|
||||
Vendored
+2
-2
@@ -9,7 +9,7 @@ import { Attributes, UnderlineStyle } from 'common/buffer/Constants'; // eslint-
|
||||
import { IBufferSet } from 'common/buffer/Types';
|
||||
import { IParams } from 'common/parser/Types';
|
||||
import { ICoreMouseService, ICoreService, IOptionsService, IUnicodeService } from 'common/services/Services';
|
||||
import { ClipboardSelection as ClipboardSelection, IFunctionIdentifier, ITerminalOptions as IPublicTerminalOptions } from 'xterm';
|
||||
import { ClipboardSelectionType as ClipboardSelectionType, IFunctionIdentifier, ITerminalOptions as IPublicTerminalOptions } from 'xterm';
|
||||
|
||||
export interface ICoreTerminal {
|
||||
coreMouseService: ICoreMouseService;
|
||||
@@ -452,7 +452,7 @@ export const enum ClipboardEventType {
|
||||
|
||||
export interface IClipboardEvent {
|
||||
type: ClipboardEventType;
|
||||
selection: ClipboardSelection;
|
||||
selection: ClipboardSelectionType;
|
||||
data: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user