about summary refs log tree commit diff stats
path: root/baremetal/shell
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-02-15 13:17:50 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-02-15 13:17:50 -0800
commitd83dce3b984c04b09eb8b79803f0417109b720ed (patch)
tree6d422958b8f215f5d6e1cfec319b5522e458174f /baremetal/shell
parentf365875fa41c363f16cfa12380b7fedd53eee0b2 (diff)
downloadmu-d83dce3b984c04b09eb8b79803f0417109b720ed.tar.gz
7751
Diffstat (limited to 'baremetal/shell')
-rw-r--r--baremetal/shell/line.mu18
1 files changed, 10 insertions, 8 deletions
diff --git a/baremetal/shell/line.mu b/baremetal/shell/line.mu
index f476e910..b86974cc 100644
--- a/baremetal/shell/line.mu
+++ b/baremetal/shell/line.mu
@@ -133,6 +133,7 @@ fn render-word-with-stack-and-cursor screen: (addr screen), line: (addr line), c
     render-cursor? <- copy 1/true
   }
   var new-x/eax: int <- render-word screen, curr-word, x, y, render-cursor?
+  add-to x, 1/word-stack-indent
   var new-x-saved/edx: int <- copy new-x
   add-to y, 2/word-stack-spacing
   # compute stack until word
@@ -166,9 +167,10 @@ fn test-render-line-with-stack-singleton {
   var new-x/eax: int <- copy 0
   var new-y/ecx: int <- copy 0
   new-x, new-y <- render-line-with-stack screen, line, 0/x, 0/y, 0/no-cursor
-  check-screen-row screen, 0/y, "1  ", "F - test-render-line-with-stack-singleton/0"
-  check-screen-row screen, 1/y, "   ", "F - test-render-line-with-stack-singleton/1"
-  check-screen-row screen, 2/y, " 1 ", "F - test-render-line-with-stack-singleton/2"
+  check-screen-row screen, 0/y, "1   ", "F - test-render-line-with-stack-singleton/0"
+  check-screen-row screen, 1/y, "    ", "F - test-render-line-with-stack-singleton/1"
+                                # ___
+  check-screen-row screen, 2/y, "  1 ", "F - test-render-line-with-stack-singleton/2"
   # not bothering to test hash colors for numbers
 }
 
@@ -185,11 +187,11 @@ fn test-render-line-with-stack {
   var new-x/eax: int <- copy 0
   var new-y/ecx: int <- copy 0
   new-x, new-y <- render-line-with-stack screen, line, 0/x, 0/y, 0/no-cursor
-  check-screen-row screen, 0/y, "1   2 ", "F - test-render-line-with-stack/0"
-  check-screen-row screen, 1/y, "       ", "F - test-render-line-with-stack/1"
-                                #___ ___
-  check-screen-row screen, 2/y, " 1   2 ", "F - test-render-line-with-stack/2"
-  check-screen-row screen, 3/y, "     1 ", "F - test-render-line-with-stack/3"
+  check-screen-row screen, 0/y, "1    2   ", "F - test-render-line-with-stack/0"
+  check-screen-row screen, 1/y, "         ", "F - test-render-line-with-stack/1"
+                                # ___  ___
+  check-screen-row screen, 2/y, "  1    2 ", "F - test-render-line-with-stack/2"
+  check-screen-row screen, 3/y, "       1 ", "F - test-render-line-with-stack/3"
   # not bothering to test hash colors for numbers
 }