From c8b2424f45fe9951bef38c9ac768cc5fa30eb6a6 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 29 May 2021 16:34:30 -0700 Subject: 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. --- shell/trace.mu | 1 + 1 file changed, 1 insertion(+) (limited to 'shell/trace.mu') 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 -- cgit 1.4.1-2-gfad0