Fix input
This commit is contained in:
parent
84f321389a
commit
3583351551
@ -83,6 +83,7 @@ func input_str(env *environment.Env) string {
|
||||
}
|
||||
switch r_rune {
|
||||
case 3: // ^C
|
||||
fmt.Println("^C")
|
||||
input = ""
|
||||
case 4: // ^D
|
||||
input = "exit"
|
||||
@ -93,10 +94,11 @@ func input_str(env *environment.Env) string {
|
||||
input = env.History[history_index]
|
||||
}
|
||||
case 66: // DOWN
|
||||
if history_index < len(env.History)-1 {
|
||||
if history_index < len(env.History)-2 {
|
||||
history_index++
|
||||
input = env.History[history_index]
|
||||
} else {
|
||||
history_index = len(env.History)-1
|
||||
input = ""
|
||||
}
|
||||
case 67: // LEFT
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user