diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-06-27 11:16:36 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-06-27 11:16:36 -0700 |
commit | 0f0be736fbe118612ad0b8f2bd84c2e7f4c35ade (patch) | |
tree | 82f3c8691f6d85f0749265660841eb450fbeaa2a /edit | |
parent | 9a7e1a0f362cce3f9c1501e08743f09bfa9f8cb1 (diff) | |
download | mu-0f0be736fbe118612ad0b8f2bd84c2e7f4c35ade.tar.gz |
3962
Yet another regression, this time cascading from commit 3953. My scenario wasn't actually testing what I thought it was testing.
Diffstat (limited to 'edit')
-rw-r--r-- | edit/003-shortcuts.mu | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/edit/003-shortcuts.mu b/edit/003-shortcuts.mu index 77627357..6ffc9bcf 100644 --- a/edit/003-shortcuts.mu +++ b/edit/003-shortcuts.mu @@ -1419,6 +1419,9 @@ def move-to-next-line editor:&:editor, screen-height:num -> go-render?:bool, edi { next:&:duplex-list:char <- next before-cursor break-unless next + c:char <- get *next, value:offset + at-newline?:bool <- equal c, 10/newline + break-if at-newline? done?:bool <- greater-or-equal cursor-column, target-column break-if done? cursor-column <- add cursor-column, 1 @@ -1438,13 +1441,16 @@ def move-to-next-line editor:&:editor, screen-height:num -> go-render?:bool, edi scenario editor-adjusts-column-at-next-line [ local-scope assume-screen 10/width, 5/height - s:text <- new [abc -de] + # second line is shorter than first + s:text <- new [abcde +fg +hi] e:&:editor <- new-editor s, 0/left, 10/right editor-render screen, e $clear-trace + # move to end of first line, then press down assume-console [ - left-click 1, 3 + left-click 1, 8 press down-arrow ] run [ @@ -1452,6 +1458,7 @@ de] 3:num/raw <- get *e, cursor-row:offset 4:num/raw <- get *e, cursor-column:offset ] + # cursor doesn't go vertically down, it goes to end of shorter line memory-should-contain [ 3 <- 2 4 <- 2 @@ -1465,10 +1472,10 @@ de] ] screen-should-contain [ . . - .abc . - .de0 . + .abcde . + .fg0 . + .hi . .┈┈┈┈┈┈┈┈┈┈. - . . ] ] |