@@ -687,16 +687,17 @@ const Completion = Module("completion", {
687
687
context . fork . apply ( context , [ "list" , 0 , completion , name ] . concat ( Array . slice ( arguments , 3 ) ) ) ;
688
688
context . wait ( ) ;
689
689
690
- for ( let [ key , context ] in Iterator ( context . contexts ) ) {
691
- if ( key . startsWith ( "/list" ) ) {
692
- let list = template . genericOutput ( "" ,
693
- xml `<div highlight="Completions">
694
- ${ template . completionRow ( context . title , "CompTitle" ) }
695
- ${ template . map2 ( xml , context . items , function ( item ) context . createRow ( item ) , null , 100 ) }
696
- </div>` ) ;
697
- commandline . echo ( list , commandline . HL_NORMAL , commandline . FORCE_MULTILINE ) ;
698
- }
699
- }
690
+ Object . keys ( context . contexts )
691
+ . filter ( k => k . startsWith ( "/list" ) )
692
+ . forEach ( function ( k ) {
693
+ let ctx = context . contexts [ k ] ;
694
+ let list = template . genericOutput ( "" ,
695
+ xml `<div highlight="Completions">
696
+ ${ template . completionRow ( ctx . title , "CompTitle" ) }
697
+ ${ template . map2 ( xml , ctx . items , function ( item ) ctx . createRow ( item ) , null , 100 ) }
698
+ </div>` ) ;
699
+ commandline . echo ( list , commandline . HL_NORMAL , commandline . FORCE_MULTILINE ) ;
700
+ } ) ;
700
701
} ,
701
702
702
703
////////////////////////////////////////////////////////////////////////////////
0 commit comments