diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-03-09 13:21:05 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-03-09 13:21:32 -0700 |
commit | b368f41a51c1e0f664485813035d7e62d4e725e6 (patch) | |
tree | 6fc4bcd6032a3e935f784b1393a1abf40d45f031 | |
parent | 2955018c7033df6919465fb72e292443a0013668 (diff) | |
download | mu-b368f41a51c1e0f664485813035d7e62d4e725e6.tar.gz |
875
-rw-r--r-- | trace.arc.t | 26 | ||||
-rw-r--r-- | trace.mu | 8 |
2 files changed, 27 insertions, 7 deletions
diff --git a/trace.arc.t b/trace.arc.t index c5141099..d516c8bc 100644 --- a/trace.arc.t +++ b/trace.arc.t @@ -572,10 +572,22 @@ run: main 7: n") "+ main/ 1 : d e f" " ")) (prn "F - expanding doesn't print past end of page")) +(run-code main2-2 + (replace-character 2:terminal-address/raw ((#\* literal))) + ) +; screen shows part of the second trace line expanded +(when (~screen-contains memory*.4 17 + (+ "* main/ 0 : a b c" + " mem : 0 a " + "+ main/ 1 : d e f" + " ")) + (prn "F - cursor at right place after expand")) ; expand line below without first collapsing previously expanded line (run-code main3 (default-space:space-address <- new space:literal 30:literal/capacity) + ; reset previous cursor + (replace-character 2:terminal-address/raw ((#\- literal))) (s:string-address <- new "j\n") (k:keyboard-address <- init-keyboard s:string-address) (process-key 3:space-address/raw/browser-state k:keyboard-address 2:terminal-address/raw) @@ -592,10 +604,23 @@ run: main 7: n") " " " ")) (prn "F - expanding below expanded line respects screen/page height")) +(run-code main3-2 + (replace-character 2:terminal-address/raw ((#\* literal))) + ) +; screen shows part of the second trace line expanded +(when (~screen-contains memory*.4 17 + (+ "+ main/ 0 : a b c" + "* main/ 1 : d e f" + " mem : 1 a " + " " + " ")) + (prn "F - cursor at right place after expand below")) ; expand line *above* without first collapsing previously expanded line (run-code main4 (default-space:space-address <- new space:literal 30:literal/capacity) + ; reset previous cursor + (replace-character 2:terminal-address/raw ((#\- literal))) (s:string-address <- new "k\n") (k:keyboard-address <- init-keyboard s:string-address) (process-key 3:space-address/raw/browser-state k:keyboard-address 2:terminal-address/raw) @@ -611,6 +636,7 @@ run: main 7: n") "+ main/ 1 : d e f" " ")) (prn "F - expanding above expanded line respects screen/page height")) +;? (quit) ;? 1 ; collapse everything and hit page-down ; again, we can't yet check for special keys like 'page-down so we'll use diff --git a/trace.mu b/trace.mu index b2365d66..1626a7eb 100644 --- a/trace.mu +++ b/trace.mu @@ -707,13 +707,7 @@ (loop) } ; print traces collapsed until just before original row - { begin - (done?:boolean <- greater-or-equal cursor-row:integer/space:1 original-trace-index:integer) - (break-if done?:boolean) - (tr:instruction-trace-address <- index traces:instruction-trace-address-array-address/space:1/deref cursor-row:integer/space:1) - (print-instruction-trace-collapsed screen:terminal-address tr:instruction-trace-address 0:space-address/browser-state) - (loop) - } + (print-traces-collapsed-from 0:space-address/browser-state screen:terminal-address cursor-row:integer/space:1 original-trace-index:integer/until) ; fall through } } |