@@ -940,7 +940,7 @@ namespace ts.server {
940940 return this . decorateNavigationBarItem ( project , fileName , items , compilerService . host . getLineIndex ( fileName ) ) ;
941941 }
942942
943- private getNavigateToItems ( searchValue : string , fileName : string , maxResultCount ?: number ) : protocol . NavtoItem [ ] {
943+ private getNavigateToItems ( searchValue : string , fileName : string , maxResultCount ?: number , currentFileOnly ?: boolean ) : protocol . NavtoItem [ ] {
944944 const file = ts . normalizePath ( fileName ) ;
945945 const info = this . projectService . getScriptInfo ( file ) ;
946946 const projects = this . projectService . findReferencingProjects ( info ) ;
@@ -953,7 +953,7 @@ namespace ts.server {
953953 projectsWithLanguageServiceEnabeld ,
954954 ( project : Project ) => {
955955 const compilerService = project . compilerService ;
956- const navItems = compilerService . languageService . getNavigateToItems ( searchValue , maxResultCount ) ;
956+ const navItems = compilerService . languageService . getNavigateToItems ( searchValue , maxResultCount , currentFileOnly ? fileName : undefined ) ;
957957 if ( ! navItems ) {
958958 return [ ] ;
959959 }
@@ -1188,7 +1188,7 @@ namespace ts.server {
11881188 } ,
11891189 [ CommandNames . Navto ] : ( request : protocol . Request ) => {
11901190 const navtoArgs = < protocol . NavtoRequestArgs > request . arguments ;
1191- return { response : this . getNavigateToItems ( navtoArgs . searchValue , navtoArgs . file , navtoArgs . maxResultCount ) , responseRequired : true } ;
1191+ return { response : this . getNavigateToItems ( navtoArgs . searchValue , navtoArgs . file , navtoArgs . maxResultCount , navtoArgs . currentFileOnly ) , responseRequired : true } ;
11921192 } ,
11931193 [ CommandNames . Brace ] : ( request : protocol . Request ) => {
11941194 const braceArguments = < protocol . FileLocationRequestArgs > request . arguments ;
0 commit comments