summaryrefslogtreecommitdiffstats
path: root/virtual-programs
diff options
context:
space:
mode:
authorAndrés Cuervo <andrescuervor@gmail.com>2023-10-24 21:50:34 +0000
committerAndrés Cuervo <andrescuervor@gmail.com>2023-10-24 21:50:34 +0000
commit11b459e01cbc690aca9019ef86912154a8d9ef20 (patch)
tree183e8f1fd6e1432e29b573ebc13d7a7a3622e305 /virtual-programs
parentCorrectly insert chars at x=0 (diff)
downloadfolk-11b459e01cbc690aca9019ef86912154a8d9ef20.tar.gz
folk-11b459e01cbc690aca9019ef86912154a8d9ef20.zip
Set short default code
Diffstat (limited to 'virtual-programs')
-rw-r--r--virtual-programs/editor.folk8
1 files changed, 5 insertions, 3 deletions
diff --git a/virtual-programs/editor.folk b/virtual-programs/editor.folk
index 5f2028d2..24389cf9 100644
--- a/virtual-programs/editor.folk
+++ b/virtual-programs/editor.folk
@@ -105,9 +105,9 @@ proc newRegion {program x y w h} {
Claim $program has region [region create $vertices $edges]
}
-# set baseCode "Claim\nWish \$this is outlined green"
+set baseCode "Wish \$this is outlined green"
# long base code
-set baseCode "Claim\nWish \$this is outlined green\nClaim this is a super long linelooooooooong line\nClaim the future is good\nClaim lorem ipsum long long long long long long long long long long long\nClaim bl000000000000000000000000000000_______oooooop\nClaim hello hello hello hello hello hello hello"
+# set baseCode "Claim\nWish \$this is outlined green\nClaim this is a super long linelooooooooong line\nClaim the future is good\nClaim lorem ipsum long long long long long long long long long long long\nClaim bl000000000000000000000000000000_______oooooop\nClaim hello hello hello hello hello hello hello"
Commit code { Claim $id has program code $baseCode }
proc drawText {text cursor count region} {
@@ -279,12 +279,14 @@ Every time keyboard claims key /currentCharacter/ is down with modifiers /modifi
}
Commit code { Claim $id has program code [deleteCharacter $code $cursor] }
}
+ DELETE {
+ # TODO: Implement DELETE, operates like BACKSPACE, but in the opposite direction
+ }
SPACE {
Claim the cursor is [updateCursor $cursor {x 1}]
Commit code { Claim $id has program code [insertCharacter $code " " $cursor] }
}
ENTER {
- # GOAL: Move cursor to beginning of next line
set updatedCursor [updateCursor $cursor {y 1}]
Claim the cursor is [list 0 [lindex $updatedCursor 1]]
Commit code { Claim $id has program code [insertNewline $code $cursor] }