about summary refs log tree commit diff stats
path: root/linux
Commit message (Expand)AuthorAgeFilesLines
* .Kartik K. Agaram2021-09-131-3/+5
* fix bad terminology: grapheme -> code pointKartik K. Agaram2021-08-291-5/+2
* compute-offset: literal indexKartik K. Agaram2021-08-252-5/+130
* .Kartik K. Agaram2021-08-251-6/+6
* another long-overdue bugfixKartik K. Agaram2021-08-222-3/+87
* fix a long-standing bug in Mu's translatorKartik K. Agaram2021-08-222-0/+47
* start throwing error on labels too far for /disp8Kartik K. Agaram2021-08-222-0/+70
* .Kartik K. Agaram2021-08-222-3/+4
* start throwing error on duplicate labelKartik K. Agaram2021-08-2223-72/+385
* 2021-04-212-3/+152
* an interface approximating stack tracesKartik K. Agaram2021-04-202-0/+1
* undo previous commitKartik K. Agaram2021-04-052-3/+1
* snapshot: stupid debugging sessionKartik K. Agaram2021-04-052-1/+3
* .Kartik Agaram2021-04-041-7/+9
* make online help more obviousKartik Agaram2021-04-041-0/+4
* some hacky checks for common errorsKartik K. Agaram2021-03-311-0/+4
* .Kartik Agaram2021-03-2938-98/+98
* .Kartik K. Agaram2021-03-261-0/+115
* .Kartik Agaram2021-03-241-0/+636
* fix a failing test in pack.subxKartik K. Agaram2021-03-152-5/+68
* boot.subx is now clean SubXKartik K. Agaram2021-03-152-1/+27
span>break-unless sandbox # toggle its expected-response, and save session sandbox <- toggle-expected-response sandbox save-sandboxes env hide-screen screen screen <- render-sandbox-side screen, env, 1/clear screen <- update-cursor screen, current-sandbox # no change in cursor show-screen screen loop +next-event:label } ] recipe find-click-in-sandbox-output env:address:programming-environment-data, click-row:number -> sandbox:address:sandbox-data [ local-scope load-ingredients # assert click-row >= sandbox.starting-row-on-screen sandbox:address:sandbox-data <- get *env, sandbox:offset start:number <- get *sandbox, starting-row-on-screen:offset clicked-on-sandboxes?:boolean <- greater-or-equal click-row, start assert clicked-on-sandboxes?, [extract-sandbox called on click to sandbox editor] # while click-row < sandbox.next-sandbox.starting-row-on-screen { next-sandbox:address:sandbox-data <- get *sandbox, next-sandbox:offset break-unless next-sandbox next-start:number <- get *next-sandbox, starting-row-on-screen:offset found?:boolean <- lesser-than click-row, next-start break-if found? sandbox <- copy next-sandbox loop } # return sandbox if click is in its output region response-starting-row:number <- get *sandbox, response-starting-row-on-screen:offset reply-unless response-starting-row, 0/no-click-in-sandbox-output click-in-response?:boolean <- greater-or-equal click-row, response-starting-row reply-unless click-in-response?, 0/no-click-in-sandbox-output reply sandbox ] recipe toggle-expected-response sandbox:address:sandbox-data -> sandbox:address:sandbox-data [ local-scope load-ingredients expected-response:address:address:array:character <- get-address *sandbox, expected-response:offset { # if expected-response is set, reset break-unless *expected-response *expected-response <- copy 0 reply sandbox/same-as-ingredient:0 } # if not, current response is the expected response response:address:array:character <- get *sandbox, response:offset *expected-response <- copy response ] # when rendering a sandbox, color it in red/green if expected response exists after <render-sandbox-response> [ { break-unless sandbox-response expected-response:address:array:character <- get *sandbox, expected-response:offset break-unless expected-response # fall-through to print in grey response-is-expected?:boolean <- equal expected-response, sandbox-response { break-if response-is-expected?:boolean row, screen <- render screen, sandbox-response, left, right, 1/red, row } { break-unless response-is-expected?:boolean row, screen <- render screen, sandbox-response, left, right, 2/green, row } jump +render-sandbox-end:label } ]