Added find options to terminal find widget with keybindings (#58457)

Added find options checkboxes to terminal find widget with keybindings and hooked the buttons up to use the new xterm.js find api.

Fixes #58826
This commit is contained in:
Alex Ross
2018-09-17 11:56:15 -07:00
committed by GitHub
parent 295f04ae24
commit 120b0d0522
15 changed files with 169 additions and 33 deletions

View File

@@ -89,7 +89,7 @@ export class FindInput extends Widget {
private _onRegexKeyDown = this._register(new Emitter<IKeyboardEvent>());
public readonly onRegexKeyDown: Event<IKeyboardEvent> = this._onRegexKeyDown.event;
constructor(parent: HTMLElement, contextViewProvider: IContextViewProvider, options?: IFindInputOptions) {
constructor(parent: HTMLElement, contextViewProvider: IContextViewProvider, private readonly _showOptionButtons: boolean, options?: IFindInputOptions) {
super();
this.contextViewProvider = contextViewProvider;
this.width = options.width || 100;
@@ -385,6 +385,7 @@ export class FindInput extends Widget {
let controls = document.createElement('div');
controls.className = 'controls';
controls.style.display = this._showOptionButtons ? 'block' : 'none';
controls.appendChild(this.caseSensitive.domNode);
controls.appendChild(this.wholeWords.domNode);
controls.appendChild(this.regex.domNode);