@@ -18,7 +18,6 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView
18
18
import { ContextScopedFindInput } from 'vs/platform/history/browser/contextScopedHistoryWidget' ;
19
19
import { widgetClose } from 'vs/platform/theme/common/iconRegistry' ;
20
20
import * as strings from 'vs/base/common/strings' ;
21
- import { TerminalCommandId } from 'vs/workbench/contrib/terminal/common/terminal' ;
22
21
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding' ;
23
22
import { showHistoryKeybindingHint } from 'vs/platform/history/browser/historyWidgetKeybindingHint' ;
24
23
import { status } from 'vs/base/browser/ui/aria/aria' ;
@@ -34,9 +33,12 @@ interface IFindOptions {
34
33
showCommonFindToggles ?: boolean ;
35
34
checkImeCompletionState ?: boolean ;
36
35
showResultCount ?: boolean ;
37
- appendCaseSensitiveLabel ?: string ;
38
- appendRegexLabel ?: string ;
39
- appendWholeWordsLabel ?: string ;
36
+ appendCaseSensitiveActionId ?: string ;
37
+ appendRegexActionId ?: string ;
38
+ appendWholeWordsActionId ?: string ;
39
+ previousMatchActionId ?: string ;
40
+ nextMatchActionId ?: string ;
41
+ closeWidgetActionId ?: string ;
40
42
matchesLimit ?: number ;
41
43
type ?: 'Terminal' | 'Webview' ;
42
44
}
@@ -89,9 +91,9 @@ export abstract class SimpleFindWidget extends Widget {
89
91
}
90
92
} ,
91
93
showCommonFindToggles : options . showCommonFindToggles ,
92
- appendCaseSensitiveLabel : options . appendCaseSensitiveLabel && options . type === 'Terminal' ? this . _getKeybinding ( TerminalCommandId . ToggleFindCaseSensitive ) : undefined ,
93
- appendRegexLabel : options . appendRegexLabel && options . type === 'Terminal' ? this . _getKeybinding ( TerminalCommandId . ToggleFindRegex ) : undefined ,
94
- appendWholeWordsLabel : options . appendWholeWordsLabel && options . type === 'Terminal' ? this . _getKeybinding ( TerminalCommandId . ToggleFindWholeWord ) : undefined ,
94
+ appendCaseSensitiveLabel : options . appendCaseSensitiveActionId ? this . _getKeybinding ( options . appendCaseSensitiveActionId ) : undefined ,
95
+ appendRegexLabel : options . appendRegexActionId ? this . _getKeybinding ( options . appendRegexActionId ) : undefined ,
96
+ appendWholeWordsLabel : options . appendWholeWordsActionId ? this . _getKeybinding ( options . appendWholeWordsActionId ) : undefined ,
95
97
showHistoryHint : ( ) => showHistoryKeybindingHint ( _keybindingService ) ,
96
98
inputBoxStyles : defaultInputBoxStyles ,
97
99
toggleStyles : defaultToggleStyles
@@ -131,23 +133,23 @@ export abstract class SimpleFindWidget extends Widget {
131
133
} ) ) ;
132
134
133
135
this . prevBtn = this . _register ( new SimpleButton ( {
134
- label : NLS_PREVIOUS_MATCH_BTN_LABEL ,
136
+ label : NLS_PREVIOUS_MATCH_BTN_LABEL + ( options . previousMatchActionId ? this . _getKeybinding ( options . previousMatchActionId ) : '' ) ,
135
137
icon : findPreviousMatchIcon ,
136
138
onTrigger : ( ) => {
137
139
this . find ( true ) ;
138
140
}
139
141
} ) ) ;
140
142
141
143
this . nextBtn = this . _register ( new SimpleButton ( {
142
- label : NLS_NEXT_MATCH_BTN_LABEL ,
144
+ label : NLS_NEXT_MATCH_BTN_LABEL + ( options . nextMatchActionId ? this . _getKeybinding ( options . nextMatchActionId ) : '' ) ,
143
145
icon : findNextMatchIcon ,
144
146
onTrigger : ( ) => {
145
147
this . find ( false ) ;
146
148
}
147
149
} ) ) ;
148
150
149
151
const closeBtn = this . _register ( new SimpleButton ( {
150
- label : NLS_CLOSE_BTN_LABEL ,
152
+ label : NLS_CLOSE_BTN_LABEL + ( options . closeWidgetActionId ? this . _getKeybinding ( options . closeWidgetActionId ) : '' ) ,
151
153
icon : widgetClose ,
152
154
onTrigger : ( ) => {
153
155
this . hide ( ) ;
0 commit comments