diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-06-25 01:48:56 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-06-25 01:48:56 -0700 |
commit | 5405a972e44259d65c374a3c9e583e026ad7cd8e (patch) | |
tree | 84842958f20e836c1c82163dcd7781785104051a /edit/011-errors.mu | |
parent | d5a492d384994af1c4840d51b3251f384af80e86 (diff) | |
download | mu-5405a972e44259d65c374a3c9e583e026ad7cd8e.tar.gz |
3954
As a blanket rule, down-arrow now stops scrolling once the bottom margin comes on screen. Now that we have page-wise scrolling with ctrl-f/b and line-wise scrolling with ctrl-s/x, we don't need to conflate scroll positioning with the arrow keys. And as a result, early students no longer have to struggle with accidentally scrolling part of the sandbox off the screen when there's tons of empty space available. `move-to-next-line` is still super messy and will need further rethinking, but this commit simplifies the codebase as a whole by eliminating a couple of historical accidents: a) We only introduced scrolling past the bottom of the screen to allow more sandboxes to come into view before we had scrolling for the sandbox side. b) We undid scrolling past the bottom in just the recipe side to allow errors to come into view. Since these historical details are now irrelevant, we no longer need separate logic for the recipe and sandbox sides, and we don't need to keep track of the recipe-bottom separate from the bottom margin of arbitrary editors.
Diffstat (limited to 'edit/011-errors.mu')
-rw-r--r-- | edit/011-errors.mu | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/edit/011-errors.mu b/edit/011-errors.mu index 049a0853..b12286ed 100644 --- a/edit/011-errors.mu +++ b/edit/011-errors.mu @@ -30,7 +30,7 @@ after <render-recipe-errors-on-F4> [ recipes:&:editor <- get *env, recipes:offset left:num <- get *recipes, left:offset right:num <- get *recipes, right:offset - row:num <- get *env, recipe-bottom:offset + row:num <- get *recipes, bottom:offset row, screen <- render-text screen, recipe-errors, left, right, 1/red, row # draw dotted line after recipes draw-horizontal screen, row, left, right, 9480/horizontal-dotted @@ -146,7 +146,6 @@ scenario run-shows-errors-in-get [ .recipe foo [ ┊foo . . get 123:num, foo:offset ┊─────────────────────────────────────────────────. .] ┊ . - . ┊ . .foo: unknown element 'foo' in container 'number' ┊ . .foo: first ingredient of 'get' should be a contai↩┊ . .ner, but got '123:num' ┊ . @@ -158,7 +157,6 @@ scenario run-shows-errors-in-get [ . . . . . . - . . .foo: unknown element 'foo' in container 'number' . .foo: first ingredient of 'get' should be a contai . .ner, but got '123:num' . @@ -400,7 +398,6 @@ scenario run-shows-missing-type-errors [ .recipe foo [ ┊foo . . x <- copy 0 ┊─────────────────────────────────────────────────. .] ┊ . - . ┊ . .foo: missing type for 'x' in 'x <- copy 0' ┊ . .foo: can't copy '0' to 'x'; types don't match ┊ . .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊ . @@ -431,7 +428,6 @@ scenario run-shows-unbalanced-bracket-errors [ . errors found run (F4) . .recipe foo \\[ ┊foo . . x <- copy 0 ┊─────────────────────────────────────────────────. - . ┊ . .9: unbalanced '\\[' for recipe ┊ . .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊ . . ┊ . @@ -466,7 +462,6 @@ scenario run-shows-get-on-non-container-errors [ . x:&:point <- new point:type ┊ . . get x:&:point, 1:offset ┊ . .] ┊ . - . ┊ . .foo: first ingredient of 'get' should be a contai↩┊ . .ner, but got 'x:&:point' ┊ . .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊ . @@ -504,7 +499,6 @@ scenario run-shows-non-literal-get-argument-errors [ . y:&:point <- new point:type ┊ . . get *y:&:point, x:num ┊ . .] ┊ . - . ┊ . .foo: second ingredient of 'get' should have type ↩┊ . .'offset', but got 'x:num' ┊ . .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊ . @@ -537,7 +531,6 @@ scenario run-shows-errors-everytime [ . local-scope ┊─────────────────────────────────────────────────. . x:num <- copy y:num ┊ . .] ┊ . - . ┊ . .foo: tried to read ingredient 'y' in 'x:num <- co↩┊ . .py y:num' but it hasn't been written to yet ┊ . .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊ . @@ -556,7 +549,6 @@ scenario run-shows-errors-everytime [ . local-scope ┊─────────────────────────────────────────────────. . x:num <- copy y:num ┊ . .] ┊ . - . ┊ . .foo: tried to read ingredient 'y' in 'x:num <- co↩┊ . .py y:num' but it hasn't been written to yet ┊ . .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊ . |