1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 10:31:15 +02:00

Make 'nix edit' etc. work again

This commit is contained in:
Eelco Dolstra 2022-07-26 17:06:45 +02:00
parent 1790698a74
commit bb4d35dcca
15 changed files with 108 additions and 82 deletions

View file

@ -1097,7 +1097,7 @@ void EvalState::mkPos(Value & v, PosIdx p)
auto pos = positions[p];
if (auto path = std::get_if<SourcePath>(&pos.origin)) {
auto attrs = buildBindings(3);
attrs.alloc(sFile).mkString(path->path.abs());
attrs.alloc(sFile).mkString(fmt("/virtual/%d%s", path->accessor->number, path->path.abs()));
attrs.alloc(sLine).mkInt(pos.line);
attrs.alloc(sColumn).mkInt(pos.column);
v.mkAttrs(attrs);