Skip to content

Commit

Permalink
FEAT: optimized evaluation result output in console to avoid excessiv…
Browse files Browse the repository at this point in the history
…e flooding.

Result line now limited to 72 characters max. A trailing three dots sequence will signal a truncation.
  • Loading branch information
dockimbel committed Mar 25, 2013
1 parent a64940b commit 0139aff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion red/tests/console.red
Expand Up @@ -167,10 +167,16 @@ do-console: function [][

eval: [
code: load/all buffer

unless tail? code [
set/any 'result do code

unless unset? :result [
print ["==" mold :result] ;@@ use mold/part
if 67 = length? result: mold/part :result 67 [ ;-- optimized for width = 72
clear back tail result
append result "..."
]
print ["==" result]
]
]
clear buffer
Expand Down

0 comments on commit 0139aff

Please sign in to comment.