@@ -30,6 +30,7 @@ import { ITheme, registerThemingParticipant, IThemeService } from 'vs/platform/t
3030import { Color } from 'vs/base/common/color' ;
3131import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions' ;
3232import { editorFindRangeHighlight , editorFindMatch , editorFindMatchHighlight , contrastBorder , inputBackground , editorWidgetBackground , inputActiveOptionBorder , widgetShadow , inputForeground , inputBorder , inputValidationInfoBackground , inputValidationInfoBorder , inputValidationWarningBackground , inputValidationWarningBorder , inputValidationErrorBackground , inputValidationErrorBorder , errorForeground , editorWidgetBorder , editorFindMatchBorder , editorFindMatchHighlightBorder , editorFindRangeHighlightBorder , editorWidgetResizeBorder } from 'vs/platform/theme/common/colorRegistry' ;
33+ import { ContextScopedFindInput , ContextScopedHistoryInputBox } from 'vs/platform/widget/browser/input' ;
3334
3435
3536export interface IFindController {
@@ -88,6 +89,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
8889 private _controller : IFindController ;
8990 private readonly _contextViewProvider : IContextViewProvider ;
9091 private readonly _keybindingService : IKeybindingService ;
92+ private readonly _contextKeyService : IContextKeyService ;
9193
9294 private _domNode : HTMLElement ;
9395 private _findInput : FindInput ;
@@ -131,6 +133,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
131133 this . _state = state ;
132134 this . _contextViewProvider = contextViewProvider ;
133135 this . _keybindingService = keybindingService ;
136+ this . _contextKeyService = contextKeyService ;
134137
135138 this . _isVisible = false ;
136139 this . _isReplaceVisible = false ;
@@ -710,7 +713,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
710713
711714 private _buildFindPart ( ) : HTMLElement {
712715 // Find input
713- this . _findInput = this . _register ( new FindInput ( null , this . _contextViewProvider , {
716+ this . _findInput = this . _register ( new ContextScopedFindInput ( null , this . _contextViewProvider , {
714717 width : FIND_INPUT_AREA_WIDTH ,
715718 label : NLS_FIND_INPUT_LABEL ,
716719 placeholder : NLS_FIND_INPUT_PLACEHOLDER ,
@@ -733,7 +736,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
733736 return { content : e . message } ;
734737 }
735738 }
736- } ) ) ;
739+ } , this . _contextKeyService ) ) ;
737740 this . _findInput . setRegex ( ! ! this . _state . isRegex ) ;
738741 this . _findInput . setCaseSensitive ( ! ! this . _state . matchCase ) ;
739742 this . _findInput . setWholeWords ( ! ! this . _state . wholeWord ) ;
@@ -839,11 +842,11 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
839842 let replaceInput = document . createElement ( 'div' ) ;
840843 replaceInput . className = 'replace-input' ;
841844 replaceInput . style . width = REPLACE_INPUT_AREA_WIDTH + 'px' ;
842- this . _replaceInputBox = this . _register ( new HistoryInputBox ( replaceInput , null , {
845+ this . _replaceInputBox = this . _register ( new ContextScopedHistoryInputBox ( replaceInput , null , {
843846 ariaLabel : NLS_REPLACE_INPUT_LABEL ,
844847 placeholder : NLS_REPLACE_INPUT_PLACEHOLDER ,
845848 history : [ ]
846- } ) ) ;
849+ } , this . _contextKeyService ) ) ;
847850
848851 this . _register ( dom . addStandardDisposableListener ( this . _replaceInputBox . inputElement , 'keydown' , ( e ) => this . _onReplaceInputKeyDown ( e ) ) ) ;
849852 this . _register ( dom . addStandardDisposableListener ( this . _replaceInputBox . inputElement , 'input' , ( e ) => {
0 commit comments