From d11ff3b0a7d80eebf3db5b5227f1c9f71251f97c Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Thu, 24 Mar 2011 19:02:41 +0000 Subject: truncate large heap when showing heap (#2721) --- 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 """ -- cgit v0.9.1