Skip to content

Commit

Permalink
Merge pull request #2 from simpleledgerinc/master
Browse files Browse the repository at this point in the history
Add alt stack
  • Loading branch information
cpacia committed Aug 6, 2019
2 parents ae814e0 + fd513d6 commit 1a08f59
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,24 @@ scriptLoop:

tm.Println(box.String())

altstack := vm.GetAltStack()
if len(altstack) > 0 && !done && !fail {
tm.Println(tm.Background(tm.Color(tm.Bold("Alt Stack"), tm.WHITE), tm.MAGENTA))
var box *tm.Box
if done && !fail {
err = vm.CheckErrorCondition(true)
if err != nil {
done = false
fail = true
}
}
box = tm.NewBox(100|tm.PCT, len(vm.GetAltStack())+2, 0)
for i := len(altstack) - 1; i >= 0; i-- {
fmt.Fprintf(box, "%s\n", hex.EncodeToString(altstack[i]))
}
tm.Println(box.String())
}

tm.Printf("%s%s%s%s%s%s\n", "F3", tm.Background(tm.Color(tm.Bold("Step Back"), tm.WHITE), tm.CYAN), "F4", tm.Background(tm.Color(tm.Bold("Step Forward"), tm.WHITE), tm.CYAN), "ESC", tm.Background(tm.Color(tm.Bold("Quit"), tm.WHITE), tm.CYAN))
tm.Flush()

Expand Down

0 comments on commit 1a08f59

Please sign in to comment.