]> gitweb.factorcode.org Git - factor.git/commitdiff
prettyprinter regression fix
authorSlava Pestov <slava@factorcode.org>
Thu, 1 Sep 2005 06:01:51 +0000 (06:01 +0000)
committerSlava Pestov <slava@factorcode.org>
Thu, 1 Sep 2005 06:01:51 +0000 (06:01 +0000)
TODO.FACTOR.txt
library/syntax/prettyprint.factor

index a1833a2579b417cb70a103a0264a12a4f149102b..bba1400e6e6d6f27fe5119e4c5192ac8699e8f49 100644 (file)
@@ -1,7 +1,6 @@
 - reader syntax for arrays, byte arrays, displaced aliens\r
 - out of memory error when printing global namespace\r
 - removing unneeded #label\r
-- pprint trailing space regression\r
 - finish scrollbars\r
 - fix up the min thumb size hack\r
 \r
index cc2b6b48cee34f65959657f446bd2f8643d556d4..1cb55d880d6e16b8750b865aaa5267025f6acc05 100644 (file)
@@ -117,9 +117,12 @@ C: newline ( -- section )
 M: newline pprint-section* ( newline -- )
     section-start fresh-line ;
 
+: advance ( section -- )
+    section-start last-newline get = [ " " write ] unless ;
+
 M: block pprint-section* ( block -- )
     f swap block-sections [
-        over [ " " write ] when pprint-section drop t
+        over [ dup advance ] when pprint-section drop t
     ] each drop ;
 
 : <block ( -- ) <block> pprinter get pprinter-stack push ;