diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-06-25 09:31:03 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-06-25 09:31:03 -0700 |
commit | 77304fcbebcb2d83c44a3760ab1fd5fbbc91ac3a (patch) | |
tree | 12ee39643150b0bfae82e1e24fbaf965d59d711f /edit | |
parent | 5405a972e44259d65c374a3c9e583e026ad7cd8e (diff) | |
download | mu-77304fcbebcb2d83c44a3760ab1fd5fbbc91ac3a.tar.gz |
3955
Move a scenario which is after commit 3954 applicable to both editors, not just the recipe side.
Diffstat (limited to 'edit')
-rw-r--r-- | edit/003-shortcuts.mu | 32 | ||||
-rw-r--r-- | edit/005-sandbox.mu | 36 |
2 files changed, 32 insertions, 36 deletions
diff --git a/edit/003-shortcuts.mu b/edit/003-shortcuts.mu index ae9609a7..77627357 100644 --- a/edit/003-shortcuts.mu +++ b/edit/003-shortcuts.mu @@ -2930,6 +2930,38 @@ cdef] ] ] +scenario editor-stops-scrolling-once-bottom-is-visible [ + local-scope + # screen has 1 line for menu + 3 lines + assume-screen 10/width, 4/height + # initialize editor with 2 lines + s:text <- new [a +b] + e:&:editor <- new-editor s, 0/left, 10/right + editor-render screen, e + screen-should-contain [ + . . + .a . + .b . + .┈┈┈┈┈┈┈┈┈┈. + ] + # position cursor at last line, then try to move further down + assume-console [ + left-click 3, 0 + press down-arrow + ] + run [ + editor-event-loop screen, console, e + ] + # no change since the bottom border was already visible + screen-should-contain [ + . . + .a . + .b . + .┈┈┈┈┈┈┈┈┈┈. + ] +] + scenario editor-scrolls-down-on-newline [ local-scope assume-screen 5/width, 4/height diff --git a/edit/005-sandbox.mu b/edit/005-sandbox.mu index d8058d18..fc618b3b 100644 --- a/edit/005-sandbox.mu +++ b/edit/005-sandbox.mu @@ -945,42 +945,6 @@ def previous-sandbox env:&:environment, in:&:sandbox -> out:&:sandbox [ return curr ] -scenario scrolling-down-past-bottom-on-recipe-side [ - local-scope - trace-until 100/app # trace too long - assume-screen 100/width, 10/height - # initialize sandbox side and create a sandbox - assume-resources [ - [lesson/recipes.mu] <- [ - || # file containing just a newline - ] - ] - # create a sandbox - env:&:environment <- new-programming-environment resources, screen, [add 2, 2] - render-all screen, env, render - assume-console [ - press F4 - ] - event-loop screen, console, env, resources - # hit 'down' in recipe editor - assume-console [ - press page-down - ] - run [ - event-loop screen, console, env, resources - cursor:char <- copy 9251/␣ - print screen, cursor - ] - # cursor doesn't move when the end is already on-screen - screen-should-contain [ - . run (F4) . - .␣ ┊ . - . ┊─────────────────────────────────────────────────. - .┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┊0 edit copy to recipe delete . - . ┊add 2, 2 . - ] -] - scenario scrolling-through-multiple-sandboxes [ local-scope trace-until 100/app # trace too long |