@@ -30,6 +30,7 @@ import { ITheme, registerThemingParticipant, IThemeService } from 'vs/platform/t
30
30
import { Color } from 'vs/base/common/color' ;
31
31
import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions' ;
32
32
import { 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' ;
33
34
34
35
35
36
export interface IFindController {
@@ -88,6 +89,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
88
89
private _controller : IFindController ;
89
90
private readonly _contextViewProvider : IContextViewProvider ;
90
91
private readonly _keybindingService : IKeybindingService ;
92
+ private readonly _contextKeyService : IContextKeyService ;
91
93
92
94
private _domNode : HTMLElement ;
93
95
private _findInput : FindInput ;
@@ -131,6 +133,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
131
133
this . _state = state ;
132
134
this . _contextViewProvider = contextViewProvider ;
133
135
this . _keybindingService = keybindingService ;
136
+ this . _contextKeyService = contextKeyService ;
134
137
135
138
this . _isVisible = false ;
136
139
this . _isReplaceVisible = false ;
@@ -710,7 +713,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
710
713
711
714
private _buildFindPart ( ) : HTMLElement {
712
715
// Find input
713
- this . _findInput = this . _register ( new FindInput ( null , this . _contextViewProvider , {
716
+ this . _findInput = this . _register ( new ContextScopedFindInput ( null , this . _contextViewProvider , {
714
717
width : FIND_INPUT_AREA_WIDTH ,
715
718
label : NLS_FIND_INPUT_LABEL ,
716
719
placeholder : NLS_FIND_INPUT_PLACEHOLDER ,
@@ -733,7 +736,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
733
736
return { content : e . message } ;
734
737
}
735
738
}
736
- } ) ) ;
739
+ } , this . _contextKeyService ) ) ;
737
740
this . _findInput . setRegex ( ! ! this . _state . isRegex ) ;
738
741
this . _findInput . setCaseSensitive ( ! ! this . _state . matchCase ) ;
739
742
this . _findInput . setWholeWords ( ! ! this . _state . wholeWord ) ;
@@ -839,11 +842,11 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
839
842
let replaceInput = document . createElement ( 'div' ) ;
840
843
replaceInput . className = 'replace-input' ;
841
844
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 , {
843
846
ariaLabel : NLS_REPLACE_INPUT_LABEL ,
844
847
placeholder : NLS_REPLACE_INPUT_PLACEHOLDER ,
845
848
history : [ ]
846
- } ) ) ;
849
+ } , this . _contextKeyService ) ) ;
847
850
848
851
this . _register ( dom . addStandardDisposableListener ( this . _replaceInputBox . inputElement , 'keydown' , ( e ) => this . _onReplaceInputKeyDown ( e ) ) ) ;
849
852
this . _register ( dom . addStandardDisposableListener ( this . _replaceInputBox . inputElement , 'input' , ( e ) => {
0 commit comments