about summary refs log tree commit diff stats
path: root/apps/tile/word.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-09-20 13:42:13 -0700
committerKartik Agaram <vc@akkartik.com>2020-09-20 13:42:13 -0700
commit022595a20a66d09a1e1a9e0c0a7d9eb07b4e863f (patch)
treee537c1abc68b75add44a68a3afcb5a1ebcf74ba0 /apps/tile/word.mu
parenta1ae40403df306a6bfd026493303ff2aac84d48b (diff)
downloadmu-022595a20a66d09a1e1a9e0c0a7d9eb07b4e863f.tar.gz
6821 - highlight words clobbered by the next word
Another suggestion from the Future of Software forum.
Diffstat (limited to 'apps/tile/word.mu')
-rw-r--r--apps/tile/word.mu6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/tile/word.mu b/apps/tile/word.mu
index 07e5280f..70c2eafb 100644
--- a/apps/tile/word.mu
+++ b/apps/tile/word.mu
@@ -92,6 +92,12 @@ fn final-word _self: (addr word) -> result/eax: (addr word) {
   result <- copy out
 }
 
+fn first-grapheme _self: (addr word) -> result/eax: grapheme {
+  var self/esi: (addr word) <- copy _self
+  var data/eax: (addr gap-buffer) <- get self, data
+  result <- first-grapheme-in-gap-buffer data
+}
+
 fn add-grapheme-to-word _self: (addr word), c: grapheme {
   var self/esi: (addr word) <- copy _self
   var data/eax: (addr gap-buffer) <- get self, data