diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-03-24 19:02:41 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-03-24 19:02:41 (GMT) |
commit | d11ff3b0a7d80eebf3db5b5227f1c9f71251f97c (patch) | |
tree | aca69b3b30c09c1c8755b8567426a09ef6e0fe7e | |
parent | e84841539dc84fc7437969bb9759524c4bd67d6b (diff) |
truncate large heap when showing heap (#2721)
-rw-r--r-- | plugins/turtle_blocks_plugin.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/turtle_blocks_plugin.py b/plugins/turtle_blocks_plugin.py index 98f6d8d..f513b64 100644 --- a/plugins/turtle_blocks_plugin.py +++ b/plugins/turtle_blocks_plugin.py @@ -862,7 +862,11 @@ bullets')) def _prim_printheap(self): """ Display contents of heap """ - self.tw.showlabel('status', str(self.tw.lc.heap) + ' ') + heap_as_string = str(self.tw.lc.heap) + if len(heap_as_string) > 80: + self.tw.showlabel('status', str(self.tw.lc.heap)[0:79] + '…') + else: + self.tw.showlabel('status', str(self.tw.lc.heap)) def _prim_push(self, val): """ Push value onto FILO """ |