From aac2775a4d30459c3090569b26e81ba18f1423a7 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 24 Jun 2017 16:00:44 -0700 Subject: 3951 --- html/edit/012-editor-undo.mu.html | 260 +++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 130 deletions(-) (limited to 'html/edit/012-editor-undo.mu.html') diff --git a/html/edit/012-editor-undo.mu.html b/html/edit/012-editor-undo.mu.html index 24025564..1f2ab3de 100644 --- a/html/edit/012-editor-undo.mu.html +++ b/html/edit/012-editor-undo.mu.html @@ -168,17 +168,17 @@ if ('onhashchange' in window) { 105 # create an editor and type a character 106 assume-screen 10/width, 5/height 107 e:&:editor <- new-editor [], 0/left, 10/right - 108 editor-render screen, e + 108 editor-render screen, e 109 assume-console [ 110 ¦ type [0] 111 ] - 112 editor-event-loop screen, console, e + 112 editor-event-loop screen, console, e 113 # undo 114 assume-console [ 115 ¦ press ctrl-z 116 ] 117 run [ - 118 ¦ editor-event-loop screen, console, e + 118 ¦ editor-event-loop screen, console, e 119 ] 120 # character should be gone 121 screen-should-contain [ @@ -192,7 +192,7 @@ if ('onhashchange' in window) { 129 ¦ type [1] 130 ] 131 run [ - 132 ¦ editor-event-loop screen, console, e + 132 ¦ editor-event-loop screen, console, e 133 ] 134 screen-should-contain [ 135 ¦ . . @@ -297,17 +297,17 @@ if ('onhashchange' in window) { 234 # create an editor and type multiple characters 235 assume-screen 10/width, 5/height 236 e:&:editor <- new-editor [], 0/left, 10/right - 237 editor-render screen, e + 237 editor-render screen, e 238 assume-console [ 239 ¦ type [012] 240 ] - 241 editor-event-loop screen, console, e + 241 editor-event-loop screen, console, e 242 # undo 243 assume-console [ 244 ¦ press ctrl-z 245 ] 246 run [ - 247 ¦ editor-event-loop screen, console, e + 247 ¦ editor-event-loop screen, console, e 248 ] 249 # all characters must be gone 250 screen-should-contain [ @@ -323,12 +323,12 @@ if ('onhashchange' in window) { 260 # create an editor with some text 261 assume-screen 10/width, 5/height 262 e:&:editor <- new-editor [a], 0/left, 10/right - 263 editor-render screen, e + 263 editor-render screen, e 264 # type some characters 265 assume-console [ 266 ¦ type [012] 267 ] - 268 editor-event-loop screen, console, e + 268 editor-event-loop screen, console, e 269 screen-should-contain [ 270 ¦ . . 271 ¦ .012a . @@ -340,7 +340,7 @@ if ('onhashchange' in window) { 277 ¦ press ctrl-z 278 ] 279 run [ - 280 ¦ editor-event-loop screen, console, e + 280 ¦ editor-event-loop screen, console, e 281 ] 282 # back to original text 283 screen-should-contain [ @@ -354,7 +354,7 @@ if ('onhashchange' in window) { 291 ¦ type [3] 292 ] 293 run [ - 294 ¦ editor-event-loop screen, console, e + 294 ¦ editor-event-loop screen, console, e 295 ] 296 screen-should-contain [ 297 ¦ . . @@ -369,13 +369,13 @@ if ('onhashchange' in window) { 306 # create an editor with some text 307 assume-screen 10/width, 5/height 308 e:&:editor <- new-editor [ abc], 0/left, 10/right - 309 editor-render screen, e + 309 editor-render screen, e 310 # new line 311 assume-console [ 312 ¦ left-click 1, 8 313 ¦ press enter 314 ] - 315 editor-event-loop screen, console, e + 315 editor-event-loop screen, console, e 316 screen-should-contain [ 317 ¦ . . 318 ¦ . abc . @@ -395,7 +395,7 @@ if ('onhashchange' in window) { 332 ¦ press ctrl-z 333 ] 334 run [ - 335 ¦ editor-event-loop screen, console, e + 335 ¦ editor-event-loop screen, console, e 336 ] 337 3:num/raw <- get *e, cursor-row:offset 338 4:num/raw <- get *e, cursor-column:offset @@ -415,7 +415,7 @@ if ('onhashchange' in window) { 352 ¦ type [1] 353 ] 354 run [ - 355 ¦ editor-event-loop screen, console, e + 355 ¦ editor-event-loop screen, console, e 356 ] 357 screen-should-contain [ 358 ¦ . . @@ -432,12 +432,12 @@ if ('onhashchange' in window) { 369 # create an editor, type something, undo 370 assume-screen 10/width, 5/height 371 e:&:editor <- new-editor [a], 0/left, 10/right - 372 editor-render screen, e + 372 editor-render screen, e 373 assume-console [ 374 ¦ type [012] 375 ¦ press ctrl-z 376 ] - 377 editor-event-loop screen, console, e + 377 editor-event-loop screen, console, e 378 screen-should-contain [ 379 ¦ . . 380 ¦ .a . @@ -449,7 +449,7 @@ if ('onhashchange' in window) { 386 ¦ press ctrl-y 387 ] 388 run [ - 389 ¦ editor-event-loop screen, console, e + 389 ¦ editor-event-loop screen, console, e 390 ] 391 # all characters must be back 392 screen-should-contain [ @@ -463,7 +463,7 @@ if ('onhashchange' in window) { 400 ¦ type [3] 401 ] 402 run [ - 403 ¦ editor-event-loop screen, console, e + 403 ¦ editor-event-loop screen, console, e 404 ] 405 screen-should-contain [ 406 ¦ . . @@ -496,12 +496,12 @@ if ('onhashchange' in window) { 433 # create an editor, type something, undo 434 assume-screen 10/width, 5/height 435 e:&:editor <- new-editor [], 0/left, 10/right - 436 editor-render screen, e + 436 editor-render screen, e 437 assume-console [ 438 ¦ type [012] 439 ¦ press ctrl-z 440 ] - 441 editor-event-loop screen, console, e + 441 editor-event-loop screen, console, e 442 screen-should-contain [ 443 ¦ . . 444 ¦ . . @@ -513,7 +513,7 @@ if ('onhashchange' in window) { 450 ¦ press ctrl-y 451 ] 452 run [ - 453 ¦ editor-event-loop screen, console, e + 453 ¦ editor-event-loop screen, console, e 454 ] 455 # all characters must be back 456 screen-should-contain [ @@ -527,7 +527,7 @@ if ('onhashchange' in window) { 464 ¦ type [3] 465 ] 466 run [ - 467 ¦ editor-event-loop screen, console, e + 467 ¦ editor-event-loop screen, console, e 468 ] 469 screen-should-contain [ 470 ¦ . . @@ -545,17 +545,17 @@ if ('onhashchange' in window) { 482 def 483 ghi] 484 e:&:editor <- new-editor contents, 0/left, 10/right - 485 editor-render screen, e + 485 editor-render screen, e 486 assume-console [ 487 ¦ type [1] 488 ¦ press ctrl-z 489 ] - 490 editor-event-loop screen, console, e + 490 editor-event-loop screen, console, e 491 # do some more work 492 assume-console [ 493 ¦ type [0] 494 ] - 495 editor-event-loop screen, console, e + 495 editor-event-loop screen, console, e 496 screen-should-contain [ 497 ¦ . . 498 ¦ .0abc . @@ -568,7 +568,7 @@ if ('onhashchange' in window) { 505 ¦ press ctrl-y 506 ] 507 run [ - 508 ¦ editor-event-loop screen, console, e + 508 ¦ editor-event-loop screen, console, e 509 ] 510 # nothing should happen 511 screen-should-contain [ @@ -585,7 +585,7 @@ if ('onhashchange' in window) { 522 # create an editor 523 assume-screen 10/width, 5/height 524 e:&:editor <- new-editor [], 0/left, 10/right - 525 editor-render screen, e + 525 editor-render screen, e 526 # insert some text and tabs, hit enter, some more text and tabs 527 assume-console [ 528 ¦ press tab @@ -596,7 +596,7 @@ if ('onhashchange' in window) { 533 ¦ press tab 534 ¦ type [efg] 535 ] - 536 editor-event-loop screen, console, e + 536 editor-event-loop screen, console, e 537 screen-should-contain [ 538 ¦ . . 539 ¦ . ab cd . @@ -615,7 +615,7 @@ if ('onhashchange' in window) { 552 ¦ press ctrl-z 553 ] 554 run [ - 555 ¦ editor-event-loop screen, console, e + 555 ¦ editor-event-loop screen, console, e 556 ] 557 # typing in second line deleted, but not indent 558 3:num/raw <- get *e, cursor-row:offset @@ -636,7 +636,7 @@ if ('onhashchange' in window) { 573 ¦ press ctrl-z 574 ] 575 run [ - 576 ¦ editor-event-loop screen, console, e + 576 ¦ editor-event-loop screen, console, e 577 ] 578 # indent and newline deleted 579 3:num/raw <- get *e, cursor-row:offset @@ -656,7 +656,7 @@ if ('onhashchange' in window) { 593 ¦ press ctrl-z 594 ] 595 run [ - 596 ¦ editor-event-loop screen, console, e + 596 ¦ editor-event-loop screen, console, e 597 ] 598 # empty screen 599 3:num/raw <- get *e, cursor-row:offset @@ -676,7 +676,7 @@ if ('onhashchange' in window) { 613 ¦ press ctrl-y 614 ] 615 run [ - 616 ¦ editor-event-loop screen, console, e + 616 ¦ editor-event-loop screen, console, e 617 ] 618 # first line inserted 619 3:num/raw <- get *e, cursor-row:offset @@ -696,7 +696,7 @@ if ('onhashchange' in window) { 633 ¦ press ctrl-y 634 ] 635 run [ - 636 ¦ editor-event-loop screen, console, e + 636 ¦ editor-event-loop screen, console, e 637 ] 638 # newline and indent inserted 639 3:num/raw <- get *e, cursor-row:offset @@ -717,7 +717,7 @@ if ('onhashchange' in window) { 654 ¦ press ctrl-y 655 ] 656 run [ - 657 ¦ editor-event-loop screen, console, e + 657 ¦ editor-event-loop screen, console, e 658 ] 659 # indent and newline deleted 660 3:num/raw <- get *e, cursor-row:offset @@ -745,18 +745,18 @@ if ('onhashchange' in window) { 682 def 683 ghi] 684 e:&:editor <- new-editor contents, 0/left, 10/right - 685 editor-render screen, e + 685 editor-render screen, e 686 # move the cursor 687 assume-console [ 688 ¦ left-click 3, 1 689 ] - 690 editor-event-loop screen, console, e + 690 editor-event-loop screen, console, e 691 # undo 692 assume-console [ 693 ¦ press ctrl-z 694 ] 695 run [ - 696 ¦ editor-event-loop screen, console, e + 696 ¦ editor-event-loop screen, console, e 697 ] 698 # click undone 699 3:num/raw <- get *e, cursor-row:offset @@ -770,7 +770,7 @@ if ('onhashchange' in window) { 707 ¦ type [1] 708 ] 709 run [ - 710 ¦ editor-event-loop screen, console, e + 710 ¦ editor-event-loop screen, console, e 711 ] 712 screen-should-contain [ 713 ¦ . . @@ -842,7 +842,7 @@ if ('onhashchange' in window) { 779 ¦ left-click 3, 3 780 ¦ press right-arrow 781 ] - 782 editor-event-loop screen, console, e + 782 editor-event-loop screen, console, e 783 3:num/raw <- get *e, cursor-row:offset 784 4:num/raw <- get *e, cursor-column:offset 785 # screen scrolls @@ -861,7 +861,7 @@ if ('onhashchange' in window) { 798 ¦ press ctrl-z 799 ] 800 run [ - 801 ¦ editor-event-loop screen, console, e + 801 ¦ editor-event-loop screen, console, e 802 ] 803 # cursor moved back 804 3:num/raw <- get *e, cursor-row:offset @@ -882,7 +882,7 @@ if ('onhashchange' in window) { 819 ¦ type [1] 820 ] 821 run [ - 822 ¦ editor-event-loop screen, console, e + 822 ¦ editor-event-loop screen, console, e 823 ] 824 screen-should-contain [ 825 ¦ . . @@ -900,19 +900,19 @@ if ('onhashchange' in window) { 837 def 838 ghi] 839 e:&:editor <- new-editor contents, 0/left, 10/right - 840 editor-render screen, e + 840 editor-render screen, e 841 # move the cursor 842 assume-console [ 843 ¦ left-click 3, 1 844 ¦ press left-arrow 845 ] - 846 editor-event-loop screen, console, e + 846 editor-event-loop screen, console, e 847 # undo 848 assume-console [ 849 ¦ press ctrl-z 850 ] 851 run [ - 852 ¦ editor-event-loop screen, console, e + 852 ¦ editor-event-loop screen, console, e 853 ] 854 # cursor moves back 855 3:num/raw <- get *e, cursor-row:offset @@ -926,7 +926,7 @@ if ('onhashchange' in window) { 863 ¦ type [1] 864 ] 865 run [ - 866 ¦ editor-event-loop screen, console, e + 866 ¦ editor-event-loop screen, console, e 867 ] 868 screen-should-contain [ 869 ¦ . . @@ -945,13 +945,13 @@ if ('onhashchange' in window) { 882 def 883 ghi] 884 e:&:editor <- new-editor contents, 0/left, 10/right - 885 editor-render screen, e + 885 editor-render screen, e 886 # move the cursor 887 assume-console [ 888 ¦ left-click 3, 1 889 ¦ press up-arrow 890 ] - 891 editor-event-loop screen, console, e + 891 editor-event-loop screen, console, e 892 3:num/raw <- get *e, cursor-row:offset 893 4:num/raw <- get *e, cursor-column:offset 894 memory-should-contain [ @@ -963,7 +963,7 @@ if ('onhashchange' in window) { 900 ¦ press ctrl-z 901 ] 902 run [ - 903 ¦ editor-event-loop screen, console, e + 903 ¦ editor-event-loop screen, console, e 904 ] 905 # cursor moves back 906 3:num/raw <- get *e, cursor-row:offset @@ -977,7 +977,7 @@ if ('onhashchange' in window) { 914 ¦ type [1] 915 ] 916 run [ - 917 ¦ editor-event-loop screen, console, e + 917 ¦ editor-event-loop screen, console, e 918 ] 919 screen-should-contain [ 920 ¦ . . @@ -996,19 +996,19 @@ if ('onhashchange' in window) { 933 def 934 ghi] 935 e:&:editor <- new-editor contents, 0/left, 10/right - 936 editor-render screen, e + 936 editor-render screen, e 937 # move the cursor 938 assume-console [ 939 ¦ left-click 2, 1 940 ¦ press down-arrow 941 ] - 942 editor-event-loop screen, console, e + 942 editor-event-loop screen, console, e 943 # undo 944 assume-console [ 945 ¦ press ctrl-z 946 ] 947 run [ - 948 ¦ editor-event-loop screen, console, e + 948 ¦ editor-event-loop screen, console, e 949 ] 950 # cursor moves back 951 3:num/raw <- get *e, cursor-row:offset @@ -1022,7 +1022,7 @@ if ('onhashchange' in window) { 959 ¦ type [1] 960 ] 961 run [ - 962 ¦ editor-event-loop screen, console, e + 962 ¦ editor-event-loop screen, console, e 963 ] 964 screen-should-contain [ 965 ¦ . . @@ -1044,18 +1044,18 @@ if ('onhashchange' in window) { 981 e 982 f] 983 e:&:editor <- new-editor contents, 0/left, 10/right - 984 editor-render screen, e + 984 editor-render screen, e 985 # scroll the page 986 assume-console [ 987 ¦ press ctrl-f 988 ] - 989 editor-event-loop screen, console, e + 989 editor-event-loop screen, console, e 990 # undo 991 assume-console [ 992 ¦ press ctrl-z 993 ] 994 run [ - 995 ¦ editor-event-loop screen, console, e + 995 ¦ editor-event-loop screen, console, e 996 ] 997 # screen should again show page 1 998 screen-should-contain [ @@ -1078,18 +1078,18 @@ if ('onhashchange' in window) { 1015 e 1016 f] 1017 e:&:editor <- new-editor contents, 0/left, 10/right -1018 editor-render screen, e +1018 editor-render screen, e 1019 # scroll the page 1020 assume-console [ -1021 ¦ press page-down +1021 ¦ press page-down 1022 ] -1023 editor-event-loop screen, console, e +1023 editor-event-loop screen, console, e 1024 # undo 1025 assume-console [ 1026 ¦ press ctrl-z 1027 ] 1028 run [ -1029 ¦ editor-event-loop screen, console, e +1029 ¦ editor-event-loop screen, console, e 1030 ] 1031 # screen should again show page 1 1032 screen-should-contain [ @@ -1112,19 +1112,19 @@ if ('onhashchange' in window) { 1049 e 1050 f] 1051 e:&:editor <- new-editor contents, 0/left, 10/right -1052 editor-render screen, e +1052 editor-render screen, e 1053 # scroll the page down and up 1054 assume-console [ -1055 ¦ press page-down +1055 ¦ press page-down 1056 ¦ press ctrl-b 1057 ] -1058 editor-event-loop screen, console, e +1058 editor-event-loop screen, console, e 1059 # undo 1060 assume-console [ 1061 ¦ press ctrl-z 1062 ] 1063 run [ -1064 ¦ editor-event-loop screen, console, e +1064 ¦ editor-event-loop screen, console, e 1065 ] 1066 # screen should again show page 2 1067 screen-should-contain [ @@ -1147,19 +1147,19 @@ if ('onhashchange' in window) { 1084 e 1085 f] 1086 e:&:editor <- new-editor contents, 0/left, 10/right -1087 editor-render screen, e +1087 editor-render screen, e 1088 # scroll the page down and up 1089 assume-console [ -1090 ¦ press page-down -1091 ¦ press page-up +1090 ¦ press page-down +1091 ¦ press page-up 1092 ] -1093 editor-event-loop screen, console, e +1093 editor-event-loop screen, console, e 1094 # undo 1095 assume-console [ 1096 ¦ press ctrl-z 1097 ] 1098 run [ -1099 ¦ editor-event-loop screen, console, e +1099 ¦ editor-event-loop screen, console, e 1100 ] 1101 # screen should again show page 2 1102 screen-should-contain [ @@ -1179,19 +1179,19 @@ if ('onhashchange' in window) { 1116 def 1117 ghi] 1118 e:&:editor <- new-editor contents, 0/left, 10/right -1119 editor-render screen, e +1119 editor-render screen, e 1120 # move the cursor, then to start of line 1121 assume-console [ 1122 ¦ left-click 2, 1 1123 ¦ press ctrl-a 1124 ] -1125 editor-event-loop screen, console, e +1125 editor-event-loop screen, console, e 1126 # undo 1127 assume-console [ 1128 ¦ press ctrl-z 1129 ] 1130 run [ -1131 ¦ editor-event-loop screen, console, e +1131 ¦ editor-event-loop screen, console, e 1132 ] 1133 # cursor moves back 1134 3:num/raw <- get *e, cursor-row:offset @@ -1205,7 +1205,7 @@ if ('onhashchange' in window) { 1142 ¦ type [1] 1143 ] 1144 run [ -1145 ¦ editor-event-loop screen, console, e +1145 ¦ editor-event-loop screen, console, e 1146 ] 1147 screen-should-contain [ 1148 ¦ . . @@ -1224,19 +1224,19 @@ if ('onhashchange' in window) { 1161 def 1162 ghi] 1163 e:&:editor <- new-editor contents, 0/left, 10/right -1164 editor-render screen, e +1164 editor-render screen, e 1165 # move the cursor, then to start of line 1166 assume-console [ 1167 ¦ left-click 2, 1 1168 ¦ press home 1169 ] -1170 editor-event-loop screen, console, e +1170 editor-event-loop screen, console, e 1171 # undo 1172 assume-console [ 1173 ¦ press ctrl-z 1174 ] 1175 run [ -1176 ¦ editor-event-loop screen, console, e +1176 ¦ editor-event-loop screen, console, e 1177 ] 1178 # cursor moves back 1179 3:num/raw <- get *e, cursor-row:offset @@ -1250,7 +1250,7 @@ if ('onhashchange' in window) { 1187 ¦ type [1] 1188 ] 1189 run [ -1190 ¦ editor-event-loop screen, console, e +1190 ¦ editor-event-loop screen, console, e 1191 ] 1192 screen-should-contain [ 1193 ¦ . . @@ -1269,19 +1269,19 @@ if ('onhashchange' in window) { 1206 def 1207 ghi] 1208 e:&:editor <- new-editor contents, 0/left, 10/right -1209 editor-render screen, e +1209 editor-render screen, e 1210 # move the cursor, then to start of line 1211 assume-console [ 1212 ¦ left-click 2, 1 1213 ¦ press ctrl-e 1214 ] -1215 editor-event-loop screen, console, e +1215 editor-event-loop screen, console, e 1216 # undo 1217 assume-console [ 1218 ¦ press ctrl-z 1219 ] 1220 run [ -1221 ¦ editor-event-loop screen, console, e +1221 ¦ editor-event-loop screen, console, e 1222 ] 1223 # cursor moves back 1224 3:num/raw <- get *e, cursor-row:offset @@ -1295,7 +1295,7 @@ if ('onhashchange' in window) { 1232 ¦ type [1] 1233 ] 1234 run [ -1235 ¦ editor-event-loop screen, console, e +1235 ¦ editor-event-loop screen, console, e 1236 ] 1237 screen-should-contain [ 1238 ¦ . . @@ -1314,19 +1314,19 @@ if ('onhashchange' in window) { 1251 def 1252 ghi] 1253 e:&:editor <- new-editor contents, 0/left, 10/right -1254 editor-render screen, e +1254 editor-render screen, e 1255 # move the cursor, then to start of line 1256 assume-console [ 1257 ¦ left-click 2, 1 1258 ¦ press end 1259 ] -1260 editor-event-loop screen, console, e +1260 editor-event-loop screen, console, e 1261 # undo 1262 assume-console [ 1263 ¦ press ctrl-z 1264 ] 1265 run [ -1266 ¦ editor-event-loop screen, console, e +1266 ¦ editor-event-loop screen, console, e 1267 ] 1268 # cursor moves back 1269 3:num/raw <- get *e, cursor-row:offset @@ -1340,7 +1340,7 @@ if ('onhashchange' in window) { 1277 ¦ type [1] 1278 ] 1279 run [ -1280 ¦ editor-event-loop screen, console, e +1280 ¦ editor-event-loop screen, console, e 1281 ] 1282 screen-should-contain [ 1283 ¦ . . @@ -1359,7 +1359,7 @@ if ('onhashchange' in window) { 1296 def 1297 ghi] 1298 e:&:editor <- new-editor contents, 0/left, 10/right -1299 editor-render screen, e +1299 editor-render screen, e 1300 # move the cursor 1301 assume-console [ 1302 ¦ left-click 2, 1 @@ -1367,7 +1367,7 @@ if ('onhashchange' in window) { 1304 ¦ press right-arrow 1305 ¦ press up-arrow 1306 ] -1307 editor-event-loop screen, console, e +1307 editor-event-loop screen, console, e 1308 3:num/raw <- get *e, cursor-row:offset 1309 4:num/raw <- get *e, cursor-column:offset 1310 memory-should-contain [ @@ -1379,7 +1379,7 @@ if ('onhashchange' in window) { 1316 ¦ press ctrl-z 1317 ] 1318 run [ -1319 ¦ editor-event-loop screen, console, e +1319 ¦ editor-event-loop screen, console, e 1320 ] 1321 # up-arrow is undone 1322 3:num/raw <- get *e, cursor-row:offset @@ -1393,7 +1393,7 @@ if ('onhashchange' in window) { 1330 ¦ press ctrl-z 1331 ] 1332 run [ -1333 ¦ editor-event-loop screen, console, e +1333 ¦ editor-event-loop screen, console, e 1334 ] 1335 # both right-arrows are undone 1336 3:num/raw <- get *e, cursor-row:offset @@ -1414,18 +1414,18 @@ if ('onhashchange' in window) { 1351 def 1352 ghi] 1353 e:&:editor <- new-editor contents, 0/left, 10/right -1354 editor-render screen, e +1354 editor-render screen, e 1355 assume-console [ 1356 ¦ left-click 3, 1 1357 ¦ press ctrl-z 1358 ] -1359 editor-event-loop screen, console, e +1359 editor-event-loop screen, console, e 1360 # redo 1361 assume-console [ 1362 ¦ press ctrl-y 1363 ] 1364 run [ -1365 ¦ editor-event-loop screen, console, e +1365 ¦ editor-event-loop screen, console, e 1366 ] 1367 # cursor moves to left-click 1368 3:num/raw <- get *e, cursor-row:offset @@ -1439,7 +1439,7 @@ if ('onhashchange' in window) { 1376 ¦ type [1] 1377 ] 1378 run [ -1379 ¦ editor-event-loop screen, console, e +1379 ¦ editor-event-loop screen, console, e 1380 ] 1381 screen-should-contain [ 1382 ¦ . . @@ -1469,13 +1469,13 @@ if ('onhashchange' in window) { 1406 # create an editor, type some text, move the cursor, type some more text 1407 assume-screen 10/width, 5/height 1408 e:&:editor <- new-editor [], 0/left, 10/right -1409 editor-render screen, e +1409 editor-render screen, e 1410 assume-console [ 1411 ¦ type [abc] 1412 ¦ left-click 1, 1 1413 ¦ type [d] 1414 ] -1415 editor-event-loop screen, console, e +1415 editor-event-loop screen, console, e 1416 3:num/raw <- get *e, cursor-row:offset 1417 4:num/raw <- get *e, cursor-column:offset 1418 screen-should-contain [ @@ -1493,7 +1493,7 @@ if ('onhashchange' in window) { 1430 ¦ press ctrl-z 1431 ] 1432 run [ -1433 ¦ editor-event-loop screen, console, e +1433 ¦ editor-event-loop screen, console, e 1434 ¦ 3:num/raw <- get *e, cursor-row:offset 1435 ¦ 4:num/raw <- get *e, cursor-column:offset 1436 ] @@ -1513,7 +1513,7 @@ if ('onhashchange' in window) { 1450 ¦ press ctrl-z 1451 ] 1452 run [ -1453 ¦ editor-event-loop screen, console, e +1453 ¦ editor-event-loop screen, console, e 1454 ¦ 3:num/raw <- get *e, cursor-row:offset 1455 ¦ 4:num/raw <- get *e, cursor-column:offset 1456 ] @@ -1533,7 +1533,7 @@ if ('onhashchange' in window) { 1470 ¦ press ctrl-z 1471 ] 1472 run [ -1473 ¦ editor-event-loop screen, console, e +1473 ¦ editor-event-loop screen, console, e 1474 ¦ 3:num/raw <- get *e, cursor-row:offset 1475 ¦ 4:num/raw <- get *e, cursor-column:offset 1476 ] @@ -1553,7 +1553,7 @@ if ('onhashchange' in window) { 1490 ¦ press ctrl-y 1491 ] 1492 run [ -1493 ¦ editor-event-loop screen, console, e +1493 ¦ editor-event-loop screen, console, e 1494 ¦ 3:num/raw <- get *e, cursor-row:offset 1495 ¦ 4:num/raw <- get *e, cursor-column:offset 1496 ] @@ -1573,7 +1573,7 @@ if ('onhashchange' in window) { 1510 ¦ press ctrl-y 1511 ] 1512 run [ -1513 ¦ editor-event-loop screen, console, e +1513 ¦ editor-event-loop screen, console, e 1514 ¦ 3:num/raw <- get *e, cursor-row:offset 1515 ¦ 4:num/raw <- get *e, cursor-column:offset 1516 ] @@ -1594,7 +1594,7 @@ if ('onhashchange' in window) { 1531 ¦ press ctrl-y 1532 ] 1533 run [ -1534 ¦ editor-event-loop screen, console, e +1534 ¦ editor-event-loop screen, console, e 1535 ¦ 3:num/raw <- get *e, cursor-row:offset 1536 ¦ 4:num/raw <- get *e, cursor-column:offset 1537 ] @@ -1618,14 +1618,14 @@ if ('onhashchange' in window) { 1555 # create an editor 1556 assume-screen 10/width, 5/height 1557 e:&:editor <- new-editor [], 0/left, 10/right -1558 editor-render screen, e +1558 editor-render screen, e 1559 # insert some text and hit backspace 1560 assume-console [ 1561 ¦ type [abc] 1562 ¦ press backspace 1563 ¦ press backspace 1564 ] -1565 editor-event-loop screen, console, e +1565 editor-event-loop screen, console, e 1566 screen-should-contain [ 1567 ¦ . . 1568 ¦ .a . @@ -1643,7 +1643,7 @@ if ('onhashchange' in window) { 1580 ¦ press ctrl-z 1581 ] 1582 run [ -1583 ¦ editor-event-loop screen, console, e +1583 ¦ editor-event-loop screen, console, e 1584 ] 1585 3:num/raw <- get *e, cursor-row:offset 1586 4:num/raw <- get *e, cursor-column:offset @@ -1662,7 +1662,7 @@ if ('onhashchange' in window) { 1599 ¦ press ctrl-y 1600 ] 1601 run [ -1602 ¦ editor-event-loop screen, console, e +1602 ¦ editor-event-loop screen, console, e 1603 ] 1604 3:num/raw <- get *e, cursor-row:offset 1605 4:num/raw <- get *e, cursor-column:offset @@ -1763,7 +1763,7 @@ if ('onhashchange' in window) { 1700 # create an editor 1701 assume-screen 10/width, 5/height 1702 e:&:editor <- new-editor [], 0/left, 10/right -1703 editor-render screen, e +1703 editor-render screen, e 1704 # insert some text and hit delete and backspace a few times 1705 assume-console [ 1706 ¦ type [abcdef] @@ -1773,7 +1773,7 @@ if ('onhashchange' in window) { 1710 ¦ press delete 1711 ¦ press delete 1712 ] -1713 editor-event-loop screen, console, e +1713 editor-event-loop screen, console, e 1714 screen-should-contain [ 1715 ¦ . . 1716 ¦ .af . @@ -1791,7 +1791,7 @@ if ('onhashchange' in window) { 1728 ¦ press ctrl-z 1729 ] 1730 run [ -1731 ¦ editor-event-loop screen, console, e +1731 ¦ editor-event-loop screen, console, e 1732 ] 1733 3:num/raw <- get *e, cursor-row:offset 1734 4:num/raw <- get *e, cursor-column:offset @@ -1810,7 +1810,7 @@ if ('onhashchange' in window) { 1747 ¦ press ctrl-z 1748 ] 1749 run [ -1750 ¦ editor-event-loop screen, console, e +1750 ¦ editor-event-loop screen, console, e 1751 ] 1752 3:num/raw <- get *e, cursor-row:offset 1753 4:num/raw <- get *e, cursor-column:offset @@ -1829,7 +1829,7 @@ if ('onhashchange' in window) { 1766 ¦ press ctrl-z 1767 ] 1768 run [ -1769 ¦ editor-event-loop screen, console, e +1769 ¦ editor-event-loop screen, console, e 1770 ] 1771 3:num/raw <- get *e, cursor-row:offset 1772 4:num/raw <- get *e, cursor-column:offset @@ -1848,7 +1848,7 @@ if ('onhashchange' in window) { 1785 ¦ press ctrl-y 1786 ] 1787 run [ -1788 ¦ editor-event-loop screen, console, e +1788 ¦ editor-event-loop screen, console, e 1789 ] 1790 # first line inserted 1791 3:num/raw <- get *e, cursor-row:offset @@ -1868,7 +1868,7 @@ if ('onhashchange' in window) { 1805 ¦ press ctrl-y 1806 ] 1807 run [ -1808 ¦ editor-event-loop screen, console, e +1808 ¦ editor-event-loop screen, console, e 1809 ] 1810 # first line inserted 1811 3:num/raw <- get *e, cursor-row:offset @@ -1888,7 +1888,7 @@ if ('onhashchange' in window) { 1825 ¦ press ctrl-y 1826 ] 1827 run [ -1828 ¦ editor-event-loop screen, console, e +1828 ¦ editor-event-loop screen, console, e 1829 ] 1830 # first line inserted 1831 3:num/raw <- get *e, cursor-row:offset @@ -1954,13 +1954,13 @@ if ('onhashchange' in window) { 1891 contents:text <- new [abc 1892 def] 1893 e:&:editor <- new-editor contents, 0/left, 10/right -1894 editor-render screen, e +1894 editor-render screen, e 1895 # insert some text and hit delete and backspace a few times 1896 assume-console [ 1897 ¦ left-click 1, 1 1898 ¦ press ctrl-k 1899 ] -1900 editor-event-loop screen, console, e +1900 editor-event-loop screen, console, e 1901 screen-should-contain [ 1902 ¦ . . 1903 ¦ .a . @@ -1979,7 +1979,7 @@ if ('onhashchange' in window) { 1916 ¦ press ctrl-z 1917 ] 1918 run [ -1919 ¦ editor-event-loop screen, console, e +1919 ¦ editor-event-loop screen, console, e 1920 ] 1921 screen-should-contain [ 1922 ¦ . . @@ -1999,7 +1999,7 @@ if ('onhashchange' in window) { 1936 ¦ press ctrl-y 1937 ] 1938 run [ -1939 ¦ editor-event-loop screen, console, e +1939 ¦ editor-event-loop screen, console, e 1940 ] 1941 # first line inserted 1942 screen-should-contain [ @@ -2020,7 +2020,7 @@ if ('onhashchange' in window) { 1957 ¦ type [1] 1958 ] 1959 run [ -1960 ¦ editor-event-loop screen, console, e +1960 ¦ editor-event-loop screen, console, e 1961 ] 1962 screen-should-contain [ 1963 ¦ . . @@ -2031,10 +2031,10 @@ if ('onhashchange' in window) { 1968 ] 1969 ] 1970 -1971 after <delete-to-end-of-line-begin> [ +1971 after <delete-to-end-of-line-begin> [ 1972 top-before:&:duplex-list:char <- get *editor, top-of-screen:offset 1973 ] -1974 before <delete-to-end-of-line-end> [ +1974 before <delete-to-end-of-line-end> [ 1975 { 1976 ¦ break-unless deleted-cells # delete failed; don't add an undo operation 1977 ¦ top-after:&:duplex-list:char <- get *editor, top-of-screen:offset @@ -2057,13 +2057,13 @@ if ('onhashchange' in window) { 1994 contents:text <- new [abc 1995 def] 1996 e:&:editor <- new-editor contents, 0/left, 10/right -1997 editor-render screen, e +1997 editor-render screen, e 1998 # insert some text and hit delete and backspace a few times 1999 assume-console [ 2000 ¦ left-click 1, 2 2001 ¦ press ctrl-u 2002 ] -2003 editor-event-loop screen, console, e +2003 editor-event-loop screen, console, e 2004 screen-should-contain [ 2005 ¦ . . 2006 ¦ .c . @@ -2082,7 +2082,7 @@ if ('onhashchange' in window) { 2019 ¦ press ctrl-z 2020 ] 2021 run [ -2022 ¦ editor-event-loop screen, console, e +2022 ¦ editor-event-loop screen, console, e 2023 ] 2024 screen-should-contain [ 2025 ¦ . . @@ -2102,7 +2102,7 @@ if ('onhashchange' in window) { 2039 ¦ press ctrl-y 2040 ] 2041 run [ -2042 ¦ editor-event-loop screen, console, e +2042 ¦ editor-event-loop screen, console, e 2043 ] 2044 # first line inserted 2045 screen-should-contain [ @@ -2123,7 +2123,7 @@ if ('onhashchange' in window) { 2060 ¦ type [1] 2061 ] 2062 run [ -2063 ¦ editor-event-loop screen, console, e +2063 ¦ editor-event-loop screen, console, e 2064 ] 2065 screen-should-contain [ 2066 ¦ . . @@ -2134,10 +2134,10 @@ if ('onhashchange' in window) { 2071 ] 2072 ] 2073 -2074 after <delete-to-start-of-line-begin> [ +2074 after <delete-to-start-of-line-begin> [ 2075 top-before:&:duplex-list:char <- get *editor, top-of-screen:offset 2076 ] -2077 before <delete-to-start-of-line-end> [ +2077 before <delete-to-start-of-line-end> [ 2078 { 2079 ¦ break-unless deleted-cells # delete failed; don't add an undo operation 2080 ¦ top-after:&:duplex-list:char <- get *editor, top-of-screen:offset @@ -2157,14 +2157,14 @@ if ('onhashchange' in window) { 2094 # create an editor 2095 assume-screen 10/width, 5/height 2096 e:&:editor <- new-editor [], 0/left, 10/right -2097 editor-render screen, e +2097 editor-render screen, e 2098 # insert some text and hit delete and backspace a few times 2099 assume-console [ 2100 ¦ type [abc] 2101 ¦ press ctrl-u 2102 ¦ press ctrl-z 2103 ] -2104 editor-event-loop screen, console, e +2104 editor-event-loop screen, console, e 2105 screen-should-contain [ 2106 ¦ . . 2107 ¦ .abc . -- cgit 1.4.1-2-gfad0