summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorflywind <xzsflywind@gmail.com>2022-04-25 17:19:21 +0800
committerGitHub <noreply@github.com>2022-04-25 11:19:21 +0200
commit15ae9323e8f1e045bdd68e16231528f8c08fb611 (patch)
tree638499b14315cdbf334f4d12fa9c922e133bb361 /compiler
parent465fd06d50d0dd2e65762b718ea9a726d94c110b (diff)
downloadNim-15ae9323e8f1e045bdd68e16231528f8c08fb611.tar.gz
fix NimNode comment repr() regression [backport: 1.2] (#19726)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/renderer.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/renderer.nim b/compiler/renderer.nim
index 3503c4bf6..f847aa094 100644
--- a/compiler/renderer.nim
+++ b/compiler/renderer.nim
@@ -165,6 +165,7 @@ proc putNL(g: var TSrcGen) =
 proc optNL(g: var TSrcGen, indent: int) =
   g.pendingNL = indent
   g.lineLen = indent
+  g.col = g.indent
   when defined(nimpretty): g.pendingNewlineCount = 0
 
 proc optNL(g: var TSrcGen) =
@@ -173,6 +174,7 @@ proc optNL(g: var TSrcGen) =
 proc optNL(g: var TSrcGen; a, b: PNode) =
   g.pendingNL = g.indent
   g.lineLen = g.indent
+  g.col = g.indent
   when defined(nimpretty): g.pendingNewlineCount = lineDiff(a, b)
 
 proc indentNL(g: var TSrcGen) =