aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2019-10-28 21:37:22 +0100
committerzimbatm <zimbatm@zimbatm.com>2019-10-28 21:37:22 +0100
commitd407f4d15f86aca585e0edebc5bc74ab8b1bebd1 (patch)
tree812b7e126cf9cceabf54f7fa9d342244966b9af7
parent3774fe55fd6c96e80cc91e13fe0a231ce836ac47 (diff)
nix repl: also handle lambda edit
-rw-r--r--src/nix/repl.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc
index 683a117f3..35c7aec66 100644
--- a/src/nix/repl.cc
+++ b/src/nix/repl.cc
@@ -478,6 +478,8 @@ bool NixRepl::processLine(string line)
PathSet context;
auto filename = state.coerceToString(noPos, v, context);
pos.file = state.symbols.create(filename);
+ } else if (v.type == tLambda) {
+ pos = v.lambda.fun->pos;
} else {
// assume it's a derivation
pos = findDerivationFilename(state, v, arg);