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-08-11 18:08:08 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-11 18:08:08 -0700
commita0550a55fdac81bc36f68b2f3386e3f35ba4cbc1 (patch)
treea7012e79207d5dea2eb08b9076848489ed0b77de /501draw-text.mu
parent5c55de64e010b2b44ec019d5bc546d8f2322d6d0 (diff)
downloadmu-a0550a55fdac81bc36f68b2f3386e3f35ba4cbc1.tar.gz
slack: ctrl-f for page-down
Diffstat (limited to '501draw-text.mu')
-rw-r--r--501draw-text.mu9
1 files changed, 3 insertions, 6 deletions
diff --git a/501draw-text.mu b/501draw-text.mu
index 1fec060c..03fd6f13 100644
--- a/501draw-text.mu
+++ b/501draw-text.mu
@@ -172,19 +172,16 @@ 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/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-storage: (stream byte 0x4000/print-buffer-size)
   var stream/edi: (addr stream byte) <- address stream-storage
   var text/esi: (addr array byte) <- copy _text
   var len/eax: int <- length text
-  compare len, 0x200
+  compare len, 0x4000/print-buffer-size
   {
     break-if-<
     write stream, "ERROR: stream too small in draw-text-wrapping-right-then-down"
   }
-  compare len, 0x200
+  compare len, 0x4000/print-buffer-size
   {
     break-if->=
     write stream, text