mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:31:43 +00:00
fix(svelte): Open correct file from preview panel line number (#63309)
Fixes srch-553 This commit changes the "selectline" handler to open the correct file when the file view is embedded. ## Test plan Manual testing. Open reference panel, click on reference to open preview panel, click on line number in review panel.
This commit is contained in:
parent
e24226a764
commit
b05bd5bb16
@ -272,9 +272,10 @@
|
||||
selectedLines={selectedPosition?.line ? selectedPosition : null}
|
||||
on:selectline={({ detail: range }) => {
|
||||
goto(
|
||||
SourcegraphURL.from($page.url.searchParams)
|
||||
SourcegraphURL.from(embedded ? `${repoURL}/-/blob/${filePath}` : $page.url.searchParams)
|
||||
.setLineRange(range ? { line: range.line, endLine: range.endLine } : null)
|
||||
.deleteSearchParameter('popover').search
|
||||
.deleteSearchParameter('popover')
|
||||
.toString()
|
||||
)
|
||||
}}
|
||||
{codeIntelAPI}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user