@@ -121,27 +121,20 @@ export class KeybindingsEditorModel extends EditorModel {
121121 return searchValue . split ( '@source:' ) [ 1 ] . trim ( ) || '' ;
122122 }
123123
124+ private matchSource ( itemSource : string , searchValue : string ) : boolean {
125+ return itemSource . toLowerCase ( ) === searchValue . toLowerCase ( ) ;
126+ }
127+
124128 private filterBySource ( keybindingItems : IKeybindingItem [ ] , searchValue : string , completeMatch : boolean ) : IKeybindingItemEntry [ ] {
125- const result : IKeybindingItemEntry [ ] = [ ] ;
126- const words = searchValue . split ( ' ' ) ;
127- const keybindingWords = this . splitKeybindingWords ( words ) ;
128- for ( const keybindingItem of keybindingItems ) {
129- let keybindingMatches = new KeybindingItemMatches ( this . modifierLabels , keybindingItem , searchValue , words , keybindingWords , completeMatch ) ;
130- if ( keybindingMatches . sourceMatches ) {
131- result . push ( {
129+ return < IKeybindingItemEntry [ ] > keybindingItems
130+ . filter ( ( keybindingItem : IKeybindingItem ) => this . matchSource ( keybindingItem . source , searchValue ) )
131+ . map ( ( keybindingItem : IKeybindingItem ) => (
132+ {
132133 id : KeybindingsEditorModel . getId ( keybindingItem ) ,
133134 templateId : KEYBINDING_ENTRY_TEMPLATE_ID ,
134- commandLabelMatches : keybindingMatches . commandLabelMatches ,
135- commandDefaultLabelMatches : keybindingMatches . commandDefaultLabelMatches ,
136135 keybindingItem,
137- keybindingMatches : keybindingMatches . keybindingMatches ,
138- commandIdMatches : keybindingMatches . commandIdMatches ,
139- sourceMatches : keybindingMatches . sourceMatches ,
140- whenMatches : keybindingMatches . whenMatches
141- } ) ;
142- }
143- }
144- return result ;
136+ }
137+ ) ) ;
145138 }
146139
147140 private filterByText ( keybindingItems : IKeybindingItem [ ] , searchValue : string , completeMatch : boolean ) : IKeybindingItemEntry [ ] {
0 commit comments