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
|
rl.skipStdinRead = false
|
||||||
r := []rune(string(b))
|
r := []rune(string(b))
|
||||||
|
if rl.RawInputCallback != nil {
|
||||||
rl.RawInputCallback(r[:i])
|
rl.RawInputCallback(r[:i])
|
||||||
|
}
|
||||||
|
|
||||||
if isMultiline(r[:i]) || len(rl.multiline) > 0 {
|
if isMultiline(r[:i]) || len(rl.multiline) > 0 {
|
||||||
rl.multiline = append(rl.multiline, b[:i]...)
|
rl.multiline = append(rl.multiline, b[:i]...)
|
||||||
|
|
Loading…
Reference in New Issue