From c0d61295ed3575cfea7d2a22d81bae93c6009308 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 25 Sep 2017 21:20:49 -0700 Subject: 4008 Allow list `push` operation to save result in a new list rather than mutate the existing list. --- html/edit/001-editor.mu.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'html/edit/001-editor.mu.html') diff --git a/html/edit/001-editor.mu.html b/html/edit/001-editor.mu.html index 8b13fc80..215debfd 100644 --- a/html/edit/001-editor.mu.html +++ b/html/edit/001-editor.mu.html @@ -177,8 +177,8 @@ if ('onhashchange' in window) { 113 right:num <- get *editor, right:offset 114 # traversing editor 115 curr:&:duplex-list:char <- get *editor, top-of-screen:offset -116 prev:&:duplex-list:char <- copy curr # just in case curr becomes null and we can't compute prev -117 curr <- next curr +116 prev:&:duplex-list:char <- copy curr # just in case curr becomes null and we can't compute prev +117 curr <- next curr 118 # traversing screen 119 color:num <- copy 7/white 120 row:num <- copy 1/top @@ -200,7 +200,7 @@ if ('onhashchange' in window) { 136 ¦ ¦ break-unless at-cursor-row? 137 ¦ ¦ at-cursor?:bool <- equal column, cursor-column 138 ¦ ¦ break-unless at-cursor? -139 ¦ ¦ before-cursor <- copy prev +139 ¦ ¦ before-cursor <- copy prev 140 ¦ } 141 ¦ c:char <- get *curr, value:offset 142 ¦ <character-c-received> @@ -215,7 +215,7 @@ if ('onhashchange' in window) { 151 ¦ ¦ ¦ left-of-cursor?:bool <- lesser-than column, cursor-column 152 ¦ ¦ ¦ break-unless left-of-cursor? 153 ¦ ¦ ¦ cursor-column <- copy column -154 ¦ ¦ ¦ before-cursor <- prev curr +154 ¦ ¦ ¦ before-cursor <- prev curr 155 ¦ ¦ } 156 ¦ ¦ # clear rest of line in this window 157 ¦ ¦ clear-line-until screen, right @@ -223,8 +223,8 @@ if ('onhashchange' in window) { 159 ¦ ¦ row <- add row, 1 160 ¦ ¦ column <- copy left 161 ¦ ¦ screen <- move-cursor screen, row, column -162 ¦ ¦ curr <- next curr -163 ¦ ¦ prev <- next prev +162 ¦ ¦ curr <- next curr +163 ¦ ¦ prev <- next prev 164 ¦ ¦ loop +next-character 165 ¦ } 166 ¦ { @@ -242,8 +242,8 @@ if ('onhashchange' in window) { 178 ¦ ¦ loop +next-character 179 ¦ } 180 ¦ print screen, c, color -181 ¦ curr <- next curr -182 ¦ prev <- next prev +181 ¦ curr <- next curr +182 ¦ prev <- next prev 183 ¦ column <- add column, 1 184 ¦ loop 185 } @@ -259,7 +259,7 @@ if ('onhashchange' in window) { 195 ¦ break-unless before-cursor? 196 ¦ cursor-row <- copy row 197 ¦ cursor-column <- copy column -198 ¦ before-cursor <- copy prev +198 ¦ before-cursor <- copy prev 199 } 200 *editor <- put *editor, bottom:offset, row 201 *editor <- put *editor, cursor-row:offset, cursor-row -- cgit 1.4.1-2-gfad0 #n221'>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 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662