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-23 22:53:54 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-05-23 22:53:54 -0700
commit210553ac6803f278e4ec5f604133b3e1e2126276 (patch)
treebb5865ac36e74b66b9f72c411f559fd7f575db12 /shell/trace.mu
parentbda55a3eece84545fe59b7879736ad387a0fd15a (diff)
downloadmu-210553ac6803f278e4ec5f604133b3e1e2126276.tar.gz
.
slightly improve colors
Diffstat (limited to 'shell/trace.mu')
-rw-r--r--shell/trace.mu14
1 files changed, 9 insertions, 5 deletions
diff --git a/shell/trace.mu b/shell/trace.mu
index c0d2ceb6..7100c59e 100644
--- a/shell/trace.mu
+++ b/shell/trace.mu
@@ -458,14 +458,18 @@ fn render-trace screen: (addr screen), _self: (addr trace), xmin: int, ymin: int
       var curr/ebx: (addr trace-line) <- index trace, offset
       var curr-label-ah/eax: (addr handle array byte) <- get curr, label
       var curr-label/eax: (addr array byte) <- lookup *curr-label-ah
-      var bg/edi: int <- copy 0xc5/bg=blue-bg
+      var bg: int
+      copy-to bg, 0xc5/bg=blue-bg
+      var fg: int
+      copy-to fg, 0x38/fg=trace
       compare show-cursor?, 0/false
       {
         break-if-=
         var cursor-y/eax: (addr int) <- get self, cursor-y
         compare *cursor-y, y
         break-if-!=
-        bg <- copy 7/cursor-line-bg
+        copy-to bg, 7/trace-cursor-line-bg
+        copy-to fg, 0x68/cursor-line-fg=sober-blue
         var cursor-line-index/eax: (addr int) <- get self, cursor-line-index
         copy-to *cursor-line-index, i
       }
@@ -483,9 +487,8 @@ fn render-trace screen: (addr screen), _self: (addr trace), xmin: int, ymin: int
       {
         compare display?, 0/false
         break-if-=
-        # if unclip? and i == *cursor-line-index, render unclipped
         var unclip-cursor-line?/eax: boolean <- unclip-cursor-line? self, i
-        y <- render-trace-line screen, curr, xmin, y, xmax, ymax, 0x38/fg=trace, bg, unclip-cursor-line?
+        y <- render-trace-line screen, curr, xmin, y, xmax, ymax, fg, bg, unclip-cursor-line?
         copy-to already-hiding-lines?, 0/false
         break $render-trace:iter
       }
@@ -494,7 +497,7 @@ fn render-trace screen: (addr screen), _self: (addr trace), xmin: int, ymin: int
       {
         break-if-!=
         var x/eax: int <- copy xmin
-        x, y <- draw-text-wrapping-right-then-down screen, "...", xmin, ymin, xmax, ymax, x, y, 9/fg=trace, bg
+        x, y <- draw-text-wrapping-right-then-down screen, "...", xmin, ymin, xmax, ymax, x, y, fg, bg
         y <- increment
         copy-to already-hiding-lines?, 1/true
       }
@@ -509,6 +512,7 @@ fn render-trace screen: (addr screen), _self: (addr trace), xmin: int, ymin: int
 }
 
 fn unclip-cursor-line? _self: (addr trace), _i: int -> _/eax: boolean {
+  # if unclip? and i == *cursor-line-index, render unclipped
   var self/esi: (addr trace) <- copy _self
   var unclip-cursor-line?/eax: (addr boolean) <- get self, unclip-cursor-line?
   compare *unclip-cursor-line?, 0/false