File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ namespace ts.NavigationBar {
194194 // Handle named bindings in imports e.g.:
195195 // import * as NS from "mod";
196196 // import {a, b as B} from "mod";
197- const { namedBindings} = importClause ;
197+ const { namedBindings } = importClause ;
198198 if ( namedBindings ) {
199199 if ( namedBindings . kind === SyntaxKind . NamespaceImport ) {
200200 addLeafNode ( namedBindings ) ;
@@ -660,7 +660,16 @@ namespace ts.NavigationBar {
660660 else if ( isCallExpression ( parent ) ) {
661661 const name = getCalledExpressionName ( parent . expression ) ;
662662 if ( name !== undefined ) {
663- const args = mapDefined ( parent . arguments , a => isStringLiteralLike ( a ) ? a . getText ( curSourceFile ) : undefined ) . join ( ", " ) ;
663+ const args = mapDefined ( parent . arguments , a => {
664+ if ( isStringLiteralLike ( a ) ) {
665+ const line = curSourceFile . getLineAndCharacterOfPosition ( a . pos ) . line ;
666+ const endOfLine = getEndLinePosition ( line , curSourceFile ) ;
667+
668+ return a . getText ( curSourceFile ) . substring ( 0 , endOfLine - a . pos ) ;
669+ }
670+
671+ return undefined ;
672+ } ) . join ( ", " ) ;
664673 return `${ name } (${ args } ) callback` ;
665674 }
666675 }
You can’t perform that action at this time.
0 commit comments