mirror of https://github.com/Hilbis/Hilbish
fix(readline): only call raw input callback if not nil
parent
9902560061
commit
dd9bdca5e0
|
@ -94,7 +94,9 @@ func (rl *Instance) Readline() (string, error) {
|
|||
|
||||
rl.skipStdinRead = false
|
||||
r := []rune(string(b))
|
||||
rl.RawInputCallback(r[:i])
|
||||
if rl.RawInputCallback != nil {
|
||||
rl.RawInputCallback(r[:i])
|
||||
}
|
||||
|
||||
if isMultiline(r[:i]) || len(rl.multiline) > 0 {
|
||||
rl.multiline = append(rl.multiline, b[:i]...)
|
||||
|
|
Loading…
Reference in New Issue