File tree Expand file tree Collapse file tree
src/vs/editor/contrib/find/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -508,13 +508,13 @@ export class StartFindReplaceAction extends EditorAction {
508508 let controller = CommonFindController . get ( editor ) ;
509509 let currentSelection = editor . getSelection ( ) ;
510510 // we only seed search string from selection when the current selection is single line and not empty.
511- let seedSearchStringFromSelection = currentSelection . isEmpty ( ) ||
512- currentSelection . startLineNumber ! == currentSelection . endLineNumber ;
511+ let seedSearchStringFromSelection = ! currentSelection . isEmpty ( ) &&
512+ currentSelection . startLineNumber = == currentSelection . endLineNumber ;
513513 let oldSearchString = controller . getState ( ) . searchString ;
514514 // if the existing search string in find widget is empty and we don't seed search string from selection, it means the Find Input
515515 // is still empty, so we should focus the Find Input instead of Replace Input.
516- let shouldFocus = ! oldSearchString && seedSearchStringFromSelection ?
517- FindStartFocusAction . FocusFindInput : FindStartFocusAction . FocusReplaceInput ;
516+ let shouldFocus = ( ! ! oldSearchString || seedSearchStringFromSelection ) ?
517+ FindStartFocusAction . FocusReplaceInput : FindStartFocusAction . FocusFindInput ;
518518
519519 if ( controller ) {
520520 controller . start ( {
You can’t perform that action at this time.
0 commit comments