diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-06-23 19:47:09 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-06-23 19:47:09 -0700 |
commit | b2eff9f97e02fe6f5f55133002c16116aac13ed4 (patch) | |
tree | 028a0b60dd4f7d7ff0cabad5beb8331ed27a0260 /edit/002-typing.mu | |
parent | b1e558cfe42029df630e1c2d9399d4b52c187801 (diff) | |
download | mu-b2eff9f97e02fe6f5f55133002c16116aac13ed4.tar.gz |
3942
No, my conclusion in the previous commit was wrong. When you print a character on the right margin, the cursor coordinates always wrap around to the left margin on the next row. It's just that if you're at the bottom of the screen, scrolling gives the impression that the row didn't change.
Diffstat (limited to 'edit/002-typing.mu')
-rw-r--r-- | edit/002-typing.mu | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/edit/002-typing.mu b/edit/002-typing.mu index 05ace7c5..acb0a53c 100644 --- a/edit/002-typing.mu +++ b/edit/002-typing.mu @@ -1116,11 +1116,11 @@ after <handle-special-key> [ def draw-horizontal screen:&:screen, row:num, x:num, right:num -> screen:&:screen [ local-scope load-ingredients - a:num, b:num <- cursor-position screen - stash [draw-horizontal] row [--] a b +#? a:num, b:num <- cursor-position screen +#? stash [draw-horizontal] row [--] a b height:num <- screen-height screen past-bottom?:bool <- greater-or-equal row, height - stash [ past-bottom?] past-bottom? +#? stash [ past-bottom?] past-bottom? return-if past-bottom? style:char, style-found?:bool <- next-ingredient { @@ -1138,18 +1138,18 @@ def draw-horizontal screen:&:screen, row:num, x:num, right:num -> screen:&:scree break-if bg-color-found? bg-color <- copy 0/black } - stash [aa] x +#? stash [aa] x screen <- move-cursor screen, row, x { continue?:bool <- lesser-or-equal x, right # right is inclusive, to match editor semantics break-unless continue? - a b <- cursor-position screen - stash [bb] x [--] a b +#? a b <- cursor-position screen +#? stash [bb] x [--] a b print screen, style, color, bg-color - a b <- cursor-position screen - stash [cc] x [--] a b +#? a b <- cursor-position screen +#? stash [cc] x [--] a b x <- add x, 1 loop } - stash [draw-horizontal done] +#? stash [draw-horizontal done] ] |