mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
Origin: Use SourcePath
This commit is contained in:
parent
94812cca98
commit
a9759407e5
9 changed files with 22 additions and 23 deletions
|
@ -594,8 +594,8 @@ bool NixRepl::processLine(std::string line)
|
|||
return {path, 0};
|
||||
} else if (v.isLambda()) {
|
||||
auto pos = state->positions[v.lambda.fun->pos];
|
||||
if (auto path = std::get_if<Path>(&pos.origin))
|
||||
return {SourcePath(CanonPath(*path)), pos.line};
|
||||
if (auto path = std::get_if<SourcePath>(&pos.origin))
|
||||
return {*path, pos.line};
|
||||
else
|
||||
throw Error("'%s' cannot be shown in an editor", pos);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue