nimpretty: fixes #8626

This commit is contained in:
Andreas Rumpf 2018-10-16 15:33:21 +02:00
commit ed38079b9b
5 changed files with 22 additions and 3 deletions

View file

@ -31,7 +31,7 @@ type
inquote: bool
semicolons: SemicolonKind
col, lastLineNumber, lineSpan, indentLevel, indWidth: int
nested: int
inParamList*: int
doIndentMore*: int
content: string
indentStack: seq[int]
@ -142,7 +142,7 @@ proc emitTok*(em: var Emitter; L: TLexer; tok: TToken) =
em.fixedUntil = em.content.high
elif tok.indent >= 0:
if em.lastTok in (splitters + oprSet):
if em.lastTok in (splitters + oprSet) or em.inParamList > 0:
em.indentLevel = tok.indent
else:
if tok.indent > em.indentStack[^1]: