about summary refs log tree commit diff stats
path: root/trace.arc.t
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-02-26 20:55:48 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-02-26 20:55:48 -0800
commit96fb6d348d7d93c6bc38696d37594e81a0b59cdc (patch)
treebc8334196c064cb3b30e57260af33e7e1b1d981a /trace.arc.t
parent82181e99814e9c545ae00cd5fcd94eb830c15dd6 (diff)
downloadmu-96fb6d348d7d93c6bc38696d37594e81a0b59cdc.tar.gz
844 - start of support for page navigation
To keep things simple we won't allow line navigation to span pages. You
have to switch pages with dedicated hotkeys.
Diffstat (limited to 'trace.arc.t')
-rw-r--r--trace.arc.t19
1 files changed, 19 insertions, 0 deletions
diff --git a/trace.arc.t b/trace.arc.t
index 839d87d1..fb6a3b57 100644
--- a/trace.arc.t
+++ b/trace.arc.t
@@ -626,6 +626,25 @@ run: main 8: o")
             "+ main/ 1 : d e f"
             "                 "))
   (prn "F - expanding above expanded line respects screen/page height"))
+; collapse everything and hit page-down
+; again, we can't yet check for special keys like 'page-down so we'll use
+; upper-case J and K for moving a page down or up, respectively.
+(run-code main5
+  (default-space:space-address <- new space:literal 30:literal/capacity)
+  (s:string-address <- new "\nJ")
+  (k:keyboard-address <- init-keyboard s:string-address)
+  (process-key 3:space-address/raw/browser-state k:keyboard-address 2:terminal-address/raw)
+  (process-key 3:space-address/raw/browser-state k:keyboard-address 2:terminal-address/raw)
+  )
+; screen shows second page of traces
+(when (~screen-contains memory*.4 17
+         (+ "+ main/ 3 : j    "
+            "+ main/ 4 : k    "
+            "+ main/ 5 : l    "
+            "                 "))
+  (prn "F - 'page-down' skips to next page after this one"))
+
+;?   (prn "F - 'page-down' skips to same place regardless of cursor position")
 
 ; todo
 ;   pgup/pgdn to navigate pages (minimize up/down responsibilities for performance)