about summary refs log tree commit diff stats
path: root/501draw-text.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-05-23 22:04:31 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-05-23 22:04:31 -0700
commitb2dd7e6a91c1cd6f641e977aec2e34019619441d (patch)
treea93968abe2e7111b9ec290f44a62617436cd7258 /501draw-text.mu
parent0f5b9a1534634a9bb9cf8caa66aac09832326546 (diff)
downloadmu-b2dd7e6a91c1cd6f641e977aec2e34019619441d.tar.gz
start truncating trace lines
Diffstat (limited to '501draw-text.mu')
-rw-r--r--501draw-text.mu10
1 files changed, 5 insertions, 5 deletions
diff --git a/501draw-text.mu b/501draw-text.mu
index 1a729c1f..ad7beecc 100644
--- a/501draw-text.mu
+++ b/501draw-text.mu
@@ -98,7 +98,7 @@ fn draw-code-point-at-cursor screen: (addr screen), c: code-point, color: int, b
 # return the next 'x' coordinate
 # if there isn't enough space, truncate
 fn draw-text-rightward screen: (addr screen), text: (addr array byte), x: int, xmax: int, y: int, color: int, background-color: int -> _/eax: int {
-  var stream-storage: (stream byte 0x100)
+  var stream-storage: (stream byte 0x200/print-buffer-size)
   var stream/esi: (addr stream byte) <- address stream-storage
   write stream, text
   var xcurr/eax: int <- draw-stream-rightward screen, stream, x, xmax, y, color, background-color
@@ -172,10 +172,10 @@ fn render-grapheme screen: (addr screen), g: grapheme, xmin: int, ymin: int, xma
 # that way the caller can draw more if given the same min and max bounding-box.
 # if there isn't enough space, truncate
 fn draw-text-wrapping-right-then-down screen: (addr screen), _text: (addr array byte), xmin: int, ymin: int, xmax: int, ymax: int, _x: int, _y: int, color: int, background-color: int -> _/eax: int, _/ecx: int {
-  var stream-storage: (stream byte 0x200)  # 4 rows of text = 1/12th of a real screen
-                                           # fake screens unlikely to be larger
-                                           # so this seems a reasonable size
-                                           # allocated on the stack, so quickly reclaimed
+  var stream-storage: (stream byte 0x200/print-buffer-size)  # 4 rows of text = 1/12th of a real screen
+                                                             # fake screens unlikely to be larger
+                                                             # so this seems a reasonable size
+                                                             # allocated on the stack, so quickly reclaimed
   var stream/edi: (addr stream byte) <- address stream-storage
   var text/esi: (addr array byte) <- copy _text
   var len/eax: int <- length text