diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/environment.mu | 2 | ||||
-rw-r--r-- | shell/global.mu | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/shell/environment.mu b/shell/environment.mu index b63b33f1..7aa9970b 100644 --- a/shell/environment.mu +++ b/shell/environment.mu @@ -26,7 +26,7 @@ fn render-environment screen: (addr screen), _self: (addr environment) { var cursor-in-globals-a/eax: (addr boolean) <- get self, cursor-in-globals? var cursor-in-globals?/eax: boolean <- copy *cursor-in-globals-a var globals/ecx: (addr global-table) <- get self, globals - render-globals screen, globals + render-globals screen, globals, cursor-in-globals? var sandbox/edx: (addr sandbox) <- get self, sandbox var cursor-in-sandbox?/ebx: boolean <- copy 1/true cursor-in-sandbox? <- subtract cursor-in-globals? diff --git a/shell/global.mu b/shell/global.mu index c2b600e7..ebb9a66d 100644 --- a/shell/global.mu +++ b/shell/global.mu @@ -112,7 +112,7 @@ fn write-globals out: (addr stream byte), _self: (addr global-table) { } # globals layout: 1 char padding, 41 code, 1 padding, 41 code, 1 padding = 85 chars -fn render-globals screen: (addr screen), _self: (addr global-table) { +fn render-globals screen: (addr screen), _self: (addr global-table), show-cursor?: boolean { clear-rect screen, 0/xmin, 0/ymin, 0x55/xmax, 0x2f/ymax=screen-height-without-menu, 0xdc/bg=green-bg var self/esi: (addr global-table) <- copy _self compare self, 0 @@ -164,16 +164,17 @@ fn render-globals screen: (addr screen), _self: (addr global-table) { compare y, y2 { break-if->= - x, y <- render-gap-buffer-wrapping-right-then-down screen, curr-input, 1/padding-left, y1, 0x2a/xmax, 0x2f/ymax, 0/no-cursor, 7/fg=definition, 0xc5/bg=blue-bg + x, y <- render-gap-buffer-wrapping-right-then-down screen, curr-input, 1/padding-left, y1, 0x2a/xmax, 0x2f/ymax, show-cursor?, 7/fg=definition, 0xc5/bg=blue-bg y <- add 2 copy-to y1, y break $render-globals:render-global } - x, y <- render-gap-buffer-wrapping-right-then-down screen, curr-input, 0x2b/xmin, y2, 0x54/xmax, 0x2f/ymax, 0/no-cursor, 7/fg=definition, 0xc5/bg=blue-bg + x, y <- render-gap-buffer-wrapping-right-then-down screen, curr-input, 0x2b/xmin, y2, 0x54/xmax, 0x2f/ymax, show-cursor?, 7/fg=definition, 0xc5/bg=blue-bg y <- add 2 copy-to y2, y } } + copy-to show-cursor?, 0/false curr-index <- decrement loop } |