Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

[Outline] selecting a function does not highlight the line #4616

@jasonLaster

Description

@jasonLaster

Selecting a function in the outline list does not highlight the line. I think this is because we changed selectSource and didn't update this spot.

See this pr.

It would be nice to add a mochitest for outline view when we fix this.

diff --git a/src/components/PrimaryPanes/Outline.js b/src/components/PrimaryPanes/Outline.js
index 3db4f9f..d59f1b5 100644
--- a/src/components/PrimaryPanes/Outline.js
+++ b/src/components/PrimaryPanes/Outline.js
@@ -33,7 +33,7 @@ export class Outline extends Component<Props> {
     }
     const selectedSourceId = selectedSource.get("id");
     const startLine = location.start.line;
-    selectSource(selectedSourceId, { line: startLine });
+    selectSource(selectedSourceId, { location: { line: startLine } });
   }
 
   renderPlaceholder() {

Screen Shot 2017-11-07 at 5.16.45 PM.png

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions