File tree Expand file tree Collapse file tree
src/vs/platform/keybinding/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ export class KeybindingResolver {
314314 public static getAllUnboundCommands ( boundCommands : Map < string , boolean > ) : string [ ] {
315315 const unboundCommands : string [ ] = [ ] ;
316316 const seenMap : Map < string , boolean > = new Map < string , boolean > ( ) ;
317- const addCommand = id => {
317+ const addCommand = ( id : string , includeCommandWithArgs : boolean ) => {
318318 if ( seenMap . has ( id ) ) {
319319 return ;
320320 }
@@ -325,18 +325,20 @@ export class KeybindingResolver {
325325 if ( boundCommands . get ( id ) === true ) {
326326 return ;
327327 }
328- const command = CommandsRegistry . getCommand ( id ) ;
329- if ( command && typeof command . description === 'object'
330- && isNonEmptyArray ( ( < ICommandHandlerDescription > command . description ) . args ) ) { // command with args
331- return ;
328+ if ( ! includeCommandWithArgs ) {
329+ const command = CommandsRegistry . getCommand ( id ) ;
330+ if ( command && typeof command . description === 'object'
331+ && isNonEmptyArray ( ( < ICommandHandlerDescription > command . description ) . args ) ) { // command with args
332+ return ;
333+ }
332334 }
333335 unboundCommands . push ( id ) ;
334336 } ;
335337 for ( const id in MenuRegistry . getCommands ( ) ) {
336- addCommand ( id ) ;
338+ addCommand ( id , true ) ;
337339 }
338340 for ( const id in CommandsRegistry . getCommands ( ) ) {
339- addCommand ( id ) ;
341+ addCommand ( id , false ) ;
340342 }
341343
342344 return unboundCommands ;
You can’t perform that action at this time.
0 commit comments