diff --git a/terminal/command.go b/terminal/command.go index 6ecc5396bc2b9df4d36487cf34c974892691c295..3491fcc4e67c917a60a8a763af4748c824195ae5 100644 --- a/terminal/command.go +++ b/terminal/command.go @@ -503,7 +503,13 @@ func printcontext(state *api.DebuggerState) error { arrow = "=>" } - context = append(context, fmt.Sprintf("\033[34m%s %d\033[0m:\t%s", arrow, i, line)) + var lineNum string + if i < 10 { + lineNum = fmt.Sprintf("\033[34m%s %d\033[0m:\t", arrow, i) + } else { + lineNum = fmt.Sprintf("\033[34m%s %d\033[0m:\t", arrow, i) + } + context = append(context, lineNum+line) } fmt.Println(strings.Join(context, ""))