From 710b771d92253fc9ac6fd00c4b15a85a530d1668 Mon Sep 17 00:00:00 2001 From: slava Date: Tue, 5 Dec 2006 06:20:54 +0000 Subject: [PATCH] # and & in prettyprinter output are now presentations --- TODO.txt | 4 +--- core/prettyprint/backend.factor | 7 +++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/TODO.txt b/TODO.txt index 0662a4c861..1c65349f9a 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,9 +1,6 @@ + 0.87: -- command buttons: indicate shortcuts - error popups obscure input area -- ui operations: restarts are broken -- operations which call parse are being run in the wrong namespace - callback scheduling issue + 0.88: @@ -46,6 +43,7 @@ - don't end lines with literals, shuffle words or symbols? - see should try to not show ; on a line by itself - IN: on its own line if the entire 'see' form doesn't fit +- command buttons: indicate shortcuts + ui: diff --git a/core/prettyprint/backend.factor b/core/prettyprint/backend.factor index 1311be8684..09f4dde28f 100644 --- a/core/prettyprint/backend.factor +++ b/core/prettyprint/backend.factor @@ -82,12 +82,15 @@ M: dll pprint* : nesting-limit? ( -- ? ) nesting-limit get dup [ pprinter-stack get length < ] when ; +: truncated-nesting ( obj str -- ) + swap presented associate styled-text ; + : check-recursion ( obj quot -- ) nesting-limit? [ - 2drop "#" text + drop "#" truncated-nesting ] [ over recursion-check get memq? [ - 2drop "&" text + drop "&" truncated-nesting ] [ over recursion-check get push call