Move handler into CoreService and adopt
This also fine tunes some of the data events to not clear selection and scroll to the bottom of the viewport anymore. Part of #1507 Fixes #2112
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { IBufferService, IOptionsService, ITerminalOptions, IPartialTerminalOptions } from 'common/services/Services';
|
||||
import { IBufferService, ICoreService, IOptionsService, ITerminalOptions, IPartialTerminalOptions } from 'common/services/Services';
|
||||
import { IEvent, EventEmitter } from 'common/EventEmitter';
|
||||
import { clone } from 'common/Clone';
|
||||
import { DEFAULT_OPTIONS } from 'common/services/OptionsService';
|
||||
@@ -27,6 +27,12 @@ export class MockBufferService implements IBufferService {
|
||||
reset(): void {}
|
||||
}
|
||||
|
||||
export class MockCoreService implements ICoreService {
|
||||
onData: IEvent<string> = new EventEmitter<string>().event;
|
||||
onUserInput: IEvent<void> = new EventEmitter<void>().event;
|
||||
triggerDataEvent(data: string, wasUserInput?: boolean): void {}
|
||||
}
|
||||
|
||||
export class MockOptionsService implements IOptionsService {
|
||||
options: ITerminalOptions = clone(DEFAULT_OPTIONS);
|
||||
onOptionChange: IEvent<string> = new EventEmitter<string>().event;
|
||||
|
||||
Reference in New Issue
Block a user