prettyprint.sections: don't create empty strings with zero indent.

modern-harvey2
John Benediktsson 2017-06-11 10:53:55 -07:00
parent e8cef24486
commit 3018010f67
1 changed files with 2 additions and 1 deletions

View File

@ -42,7 +42,8 @@ M: maybe vocabulary-name
: line-limit? ( -- ? )
line-limit get dup [ pprinter get line-count>> <= ] when ;
: do-indent ( -- ) pprinter get indent>> CHAR: \s <string> write ;
: do-indent ( -- )
pprinter get indent>> [ CHAR: \s <string> write ] unless-zero ;
: fresh-line ( n -- )
pprinter get 2dup last-newline>> = [