about summary refs log tree commit diff stats
path: root/browse-slack
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-11-09 08:12:11 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-11-09 08:12:11 -0800
commitd253a3182859c7c989449122a60d5f362f19ded0 (patch)
tree7459cddc57f93107fa4cee89d4f0a94dd0f0f131 /browse-slack
parentd1808995b2c6b99749237a29e6ac6477d00ff8f9 (diff)
downloadmu-d253a3182859c7c989449122a60d5f362f19ded0.tar.gz
rename grapheme to code-point-utf8
Longer name, but it doesn't lie. We have no data structure right now for
combining multiple code points. And it makes no sense for the notion of
a grapheme to conflate its Unicode encoding.
Diffstat (limited to 'browse-slack')
-rw-r--r--browse-slack/environment.mu12
1 files changed, 6 insertions, 6 deletions
diff --git a/browse-slack/environment.mu b/browse-slack/environment.mu
index 8f53a7f8..e4e24ff6 100644
--- a/browse-slack/environment.mu
+++ b/browse-slack/environment.mu
@@ -615,12 +615,12 @@ fn draw-json-stream-wrapping-right-then-down screen: (addr screen), stream: (add
     }
     compare c, 0xffffffff/end-of-file
     break-if-=
-    $draw-json-stream-wrapping-right-then-down:render-grapheme: {
+    $draw-json-stream-wrapping-right-then-down:render-code-point-utf8: {
       compare c, 0x5c/backslash
       {
         break-if-!=
         xcurr, ycurr <- render-json-escaped-code-point screen, stream, xmin, ymin, xmax, ymax, xcurr, ycurr, color, background-color
-        break $draw-json-stream-wrapping-right-then-down:render-grapheme
+        break $draw-json-stream-wrapping-right-then-down:render-code-point-utf8
       }
       compare c, 0xa/newline
       {
@@ -629,7 +629,7 @@ fn draw-json-stream-wrapping-right-then-down screen: (addr screen), stream: (add
         var dummy/eax: int <- draw-code-point screen, 0x20/space, xcurr, ycurr, color, background-color
         xcurr <- copy xmin
         ycurr <- increment
-        break $draw-json-stream-wrapping-right-then-down:render-grapheme
+        break $draw-json-stream-wrapping-right-then-down:render-code-point-utf8
       }
       var offset/eax: int <- draw-code-point screen, c, xcurr, ycurr, color, background-color
       # overlay a combining character if necessary
@@ -639,7 +639,7 @@ fn draw-json-stream-wrapping-right-then-down screen: (addr screen), stream: (add
         break-if-!=
         # read a character
         # no combining character allowed here
-        var g/eax: grapheme <- read-grapheme stream
+        var g/eax: code-point-utf8 <- read-code-point-utf8 stream
         var c/eax: code-point <- to-code-point g
         # if not a combining character, save for next iteration and loop
         {
@@ -672,7 +672,7 @@ fn draw-json-stream-wrapping-right-then-down screen: (addr screen), stream: (add
 
 # just return a different register
 fn read-json-code-point stream: (addr stream byte) -> _/ebx: code-point {
-  var g/eax: grapheme <- read-grapheme stream
+  var g/eax: code-point-utf8 <- read-code-point-utf8 stream
   var result/eax: code-point <- to-code-point g
   return result
 }
@@ -1012,7 +1012,7 @@ fn update-search _env: (addr environment), key: byte, users: (addr array user),
   # otherwise delegate
   var search-terms-ah/eax: (addr handle gap-buffer) <- get env, search-terms
   var search-terms/eax: (addr gap-buffer) <- lookup *search-terms-ah
-  var g/ecx: grapheme <- copy key
+  var g/ecx: code-point-utf8 <- copy key
   edit-gap-buffer search-terms, g
 }