about summary refs log tree commit diff stats
path: root/apps/tile/environment.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-10-25 14:34:40 -0700
committerKartik Agaram <vc@akkartik.com>2020-10-25 14:34:40 -0700
commitf37e7f33e8cf57f82181ce137ab74ec5cd28e1d9 (patch)
treedc7eeea4dffc4c77fa2741a3a20d3c338922aabf /apps/tile/environment.mu
parent4dad0efa8dfe7f7ce339f7d2d7b1aa817810665d (diff)
downloadmu-f37e7f33e8cf57f82181ce137ab74ec5cd28e1d9.tar.gz
7098 - tile: string values
Strings can contain spaces.
Diffstat (limited to 'apps/tile/environment.mu')
-rw-r--r--apps/tile/environment.mu10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index f8daaddd..2cc552c0 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -423,6 +423,16 @@ $process-sandbox:body: {
       decrement-final-element cursor-call-path
       break $process-sandbox:body
     }
+    # if start of word is quote and grapheme before cursor is not, just insert it as usual
+    {
+      var first-grapheme/eax: grapheme <- first-grapheme cursor-word
+      compare first-grapheme, 0x22  # double quote
+      break-if-!=
+      var final-grapheme/eax: grapheme <- grapheme-before-cursor cursor-word
+      compare final-grapheme, 0x22  # double quote
+      break-if-=
+      break $process-sandbox:space
+    }
     # otherwise insert word after and move cursor to it for the next key
     # (but we'll continue to track the current cursor-word for the rest of this function)
     append-word cursor-word-ah