// Up from no entry or first entry goes down to last
if((keyCode===KeyCode.UpArrow||(keyCode===KeyCode.Tab&&isShift))&&(focus===entries[0]||!focus)){// TODO@Ben should not make ordering assumptions
this.tree.focusLast();
cycled=true;
}
// Down from last entry goes to up to first
elseif((keyCode===KeyCode.DownArrow||keyCode===KeyCode.Tab&&!isShift)&&focus===entries[entries.length-1]){// TODO@Ben should not make ordering assumptions
this.tree.focusFirst();
cycled=true;
}
}
constoldFocus=this.tree.getFocus();
// Normal Navigation
if(!cycled){
switch(keyCode){
caseKeyCode.DownArrow:
this.tree.focusNext();
...
...
@@ -382,12 +363,27 @@ export class QuickOpenWidget implements IModelProvider {
}
break;
}
letnewFocus=this.tree.getFocus();
// Support cycle-through navigation if focus did not change
if(entries.length>1&&oldFocus===newFocus){
// Up from no entry or first entry goes down to last