about summary refs log tree commit diff stats
path: root/shell/trace.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-05-29 16:34:30 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-05-29 16:37:32 -0700
commitc8b2424f45fe9951bef38c9ac768cc5fa30eb6a6 (patch)
treeeb37011a27e1fc47ce2effe702b6191fdb8b6ccc /shell/trace.mu
parent4de6f80334fd6f233a3e12e8970dfa3da6d7d5cc (diff)
downloadmu-c8b2424f45fe9951bef38c9ac768cc5fa30eb6a6.tar.gz
shell: start implementing scrolling in the trace
I've been stymied for a week wondering how to reliably compute trace-line
identity. A trace can have multiple identical lines. Only some of them
may be visible at any point. How to remember which is which across re-evaluations?

There's no easy answer. I'm just going to keep things ad hoc. When you
re-evaluate, new lines can currently pop into visibility. However we guarantee
that just moving around the trace will be stable, thanks to the visible
bit being cached within each trace-line. Scrolling will be similar. Reevaluating
may cause the trace to be perturbed up or down. However, just scrolling
around will work reliably.
Diffstat (limited to 'shell/trace.mu')
-rw-r--r--shell/trace.mu1
1 files changed, 1 insertions, 0 deletions
diff --git a/shell/trace.mu b/shell/trace.mu
index 7100c59e..2bdabe99 100644
--- a/shell/trace.mu
+++ b/shell/trace.mu
@@ -21,6 +21,7 @@ type trace {
   #     append a bunch of new trace lines to the trace
   #     render loop:
   #       rendering displays trace lines that match visible lines
+  #         (caching in each line)
   #       rendering computes cursor-line based on the cursor-y coordinate
   #       edit-trace updates cursor-y coordinate
   #       edit-trace might add/remove lines to visible