File tree Expand file tree Collapse file tree
src/vs/workbench/parts/search/browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -488,16 +488,16 @@ export class SearchViewlet extends Viewlet {
488488
489489 public focusNextInputBox ( ) : void {
490490 if ( this . searchWidget . searchInputHasFocus ( ) ) {
491- this . searchWidget . focus ( true , true ) ;
491+ if ( this . searchWidget . isReplaceShown ( ) ) {
492+ this . searchWidget . focus ( true , true ) ;
493+ } else {
494+ this . moveFocusFromSearchOrReplace ( ) ;
495+ }
492496 return ;
493497 }
494498
495499 if ( this . searchWidget . replaceInputHasFocus ( ) ) {
496- if ( this . showsFileTypes ( ) ) {
497- this . toggleFileTypes ( true , this . showsFileTypes ( ) ) ;
498- } else {
499- this . selectTreeIfNotSelected ( ) ;
500- }
500+ this . moveFocusFromSearchOrReplace ( ) ;
501501 return ;
502502 }
503503
@@ -513,6 +513,14 @@ export class SearchViewlet extends Viewlet {
513513 }
514514 }
515515
516+ private moveFocusFromSearchOrReplace ( ) {
517+ if ( this . showsFileTypes ( ) ) {
518+ this . toggleFileTypes ( true , this . showsFileTypes ( ) ) ;
519+ } else {
520+ this . selectTreeIfNotSelected ( ) ;
521+ }
522+ }
523+
516524 public focusPreviousInputBox ( ) : void {
517525 if ( this . searchWidget . searchInputHasFocus ( ) ) {
518526 return ;
You can’t perform that action at this time.
0 commit comments