diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-06-24 16:37:18 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-06-24 16:37:18 -0700 |
commit | da2a4fb51a9134bacbe4a8ea445efebd3a9c003f (patch) | |
tree | 5e283b30dc2db4268c83b423bae9c36e9ad3b005 | |
parent | e8019034268ece1f5aa1bd86fdf66b952cc9ec4e (diff) | |
download | mu-da2a4fb51a9134bacbe4a8ea445efebd3a9c003f.tar.gz |
1635 - disconnect editor-data.cursor in 'render'
Old plan: deduce cursor-row/column based on cursor. New plan: deduce cursor based on cursor-row/column.
-rw-r--r-- | edit.mu | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/edit.mu b/edit.mu index 77e10983..97a5fa87 100644 --- a/edit.mu +++ b/edit.mu @@ -152,7 +152,6 @@ recipe render [ left:number <- next-ingredient screen-height:number <- screen-height screen:address right:number <- next-ingredient - cursor:address:duplex-list <- get editor:address:editor-data/deref, cursor:offset # traversing editor curr:address:duplex-list <- get editor:address:editor-data/deref, top-of-screen:offset # traversing screen @@ -166,12 +165,6 @@ recipe render [ break-unless curr:address:duplex-list off-screen?:boolean <- greater-or-equal row:number, screen-height:number break-if off-screen?:boolean - { - at-cursor?:boolean <- equal curr:address:duplex-list, cursor:address:duplex-list - break-unless at-cursor?:boolean - cursor-row:number <- copy row:number - cursor-column:number <- copy column:number - } c:character <- get curr:address:duplex-list/deref, value:offset { # newline? move to left rather than 0 @@ -205,6 +198,8 @@ recipe render [ column:number <- add column:number, 1:literal loop } + cursor-row:number <- get result:address:editor-data/deref, cursor-row:offset + cursor-column:number <- get result:address:editor-data/deref, cursor-column:offset move-cursor screen:address, cursor-row:number, cursor-column:number reply row:number, screen:address/same-as-ingredient:1 ] |