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-19 22:47:03 -0700
committerKartik Agaram <vc@akkartik.com>2020-09-19 22:47:21 -0700
commit1436f0298f4c6b9a141a4f23fb89f5c00e98175d (patch)
treeafd8ff89fbd4c7b2250a4eb5c11cd6c049d031bf /apps/tile/word.mu
parentf32e575e387859af74f7023f9f02b32dee839962 (diff)
downloadmu-1436f0298f4c6b9a141a4f23fb89f5c00e98175d.tar.gz
6812 - tile: render cursor location
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 4c7b13dd..cbc3c90d 100644
--- a/apps/tile/word.mu
+++ b/apps/tile/word.mu
@@ -134,6 +134,12 @@ fn cursor-to-end _self: (addr word) {
   gap-to-end data
 }
 
+fn cursor-index _self: (addr word) -> result/eax: int {
+  var self/esi: (addr word) <- copy _self
+  var data/eax: (addr gap-buffer) <- get self, data
+  result <- gap-index data
+}
+
 fn print-word screen: (addr screen), _self: (addr word) {
   var self/esi: (addr word) <- copy _self
   var data/eax: (addr gap-buffer) <- get self, data