From 20cbdc2741e9e34a99288ded9664378afc80acb6 Mon Sep 17 00:00:00 2001 From: Alberto Torres Date: Fri, 18 Aug 2023 21:13:27 +0200 Subject: Fix #22366 by making nimlf_/nimln_ part of the same line (#22503) Fix #22366 by making nimlf_/nimln_ part of the same line so the debugger doesn't advance to the next line before executing it --- compiler/cgen.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 811f89983..6d301dc47 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -312,10 +312,10 @@ proc genLineDir(p: BProc, t: PNode) = (p.prc == nil or sfPure notin p.prc.flags) and t.info.fileIndex != InvalidFileIdx: if freshLine: if lastFileIndex == t.info.fileIndex: - linefmt(p, cpsStmts, "nimln_($1);\n", + linefmt(p, cpsStmts, "nimln_($1);", [line]) else: - linefmt(p, cpsStmts, "nimlf_($1, $2);\n", + linefmt(p, cpsStmts, "nimlf_($1, $2);", [line, quotedFilename(p.config, t.info)]) proc accessThreadLocalVar(p: BProc, s: PSym) -- cgit 1.4.1-2-gfad0