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-11-15 23:13:23 -0800
committerKartik Agaram <vc@akkartik.com>2020-11-15 23:13:23 -0800
commit002f2609e91ed2e49c250202877290f58609a982 (patch)
tree079a758e20ff5137b197abc9ce535810351ae12e /apps/tile/environment.mu
parent2715d377b6108b0a607d9322d470bedd77c9c717 (diff)
downloadmu-002f2609e91ed2e49c250202877290f58609a982.tar.gz
7248 - mu.subx: new primitive 'clear-object'
Diffstat (limited to 'apps/tile/environment.mu')
-rw-r--r--apps/tile/environment.mu10
1 files changed, 3 insertions, 7 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu
index b774356d..c70efd7c 100644
--- a/apps/tile/environment.mu
+++ b/apps/tile/environment.mu
@@ -522,8 +522,7 @@ $process-sandbox-rename:body: {
   compare key, 0x1b  # esc
   $process-sandbox-rename:cancel: {
     break-if-!=
-    var empty: (handle word)
-    copy-handle empty, new-name-ah
+    clear-object new-name-ah
     break $process-sandbox-rename:body
   }
   # if 'enter' pressed, perform rename
@@ -586,9 +585,7 @@ $process-sandbox-rename:body: {
     # sandbox->data = new-line
     copy-handle new-line-h, sandbox-slot
     # clear partial-name-for-cursor-word
-    var empty: (handle word)
-    copy-handle empty, new-name-ah
-#?     # XXX
+    clear-object new-name-ah
 #?     var cursor-ah/eax: (addr handle call-path-element) <- get sandbox, cursor-call-path
 #?     var cursor/eax: (addr call-path-element) <- lookup *cursor-ah
 #?     var word-at-cursor-ah/eax: (addr handle word) <- get cursor, word
@@ -643,8 +640,7 @@ $process-sandbox-define:body: {
   compare key, 0x1b  # esc
   $process-sandbox-define:cancel: {
     break-if-!=
-    var empty: (handle word)
-    copy-handle empty, new-name-ah
+    clear-object new-name-ah
     break $process-sandbox-define:body
   }
   # if 'enter' pressed, perform define
/a>
/a>
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284