aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/command.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@protonmail.com>2022-04-06 19:08:29 -0600
committerBen Burdette <bburdette@protonmail.com>2022-04-06 19:08:29 -0600
commit5cfd038bd8bcd65c45f08f6c3665cd49e6643714 (patch)
tree217d909a97cfec7d8d44928e5123fab006e10c2d /src/libcmd/command.cc
parentf41c18b2210ac36743f03ea218860b7941f4264e (diff)
show expr pos if DebugTrace one is noPos
Diffstat (limited to 'src/libcmd/command.cc')
-rw-r--r--src/libcmd/command.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc
index 34535802f..cc353cbb4 100644
--- a/src/libcmd/command.cc
+++ b/src/libcmd/command.cc
@@ -129,7 +129,7 @@ ref<EvalState> EvalCommand::getEvalState()
new DebugTraceStacker(
*evalState,
DebugTrace
- {.pos = *expr.getPos(),
+ {.pos = (error->info().errPos ? *error->info().errPos : *expr.getPos()),
.expr = expr,
.env = env,
.hint = error->info().msg,