From 5cfd038bd8bcd65c45f08f6c3665cd49e6643714 Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Wed, 6 Apr 2022 19:08:29 -0600 Subject: show expr pos if DebugTrace one is noPos --- src/libcmd/command.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcmd/command.cc') 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 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, -- cgit v1.2.3