forked from mirror/readline
fixing deadloop when input is filtered
This commit is contained in:
parent
8e4bd417b9
commit
7f93d88cd5
|
@ -109,10 +109,12 @@ func (o *Operation) ioloop() {
|
||||||
keepInSearchMode := false
|
keepInSearchMode := false
|
||||||
keepInCompleteMode := false
|
keepInCompleteMode := false
|
||||||
r := o.t.ReadRune()
|
r := o.t.ReadRune()
|
||||||
|
|
||||||
if o.GetConfig().FuncFilterInputRune != nil {
|
if o.GetConfig().FuncFilterInputRune != nil {
|
||||||
var process bool
|
var process bool
|
||||||
r, process = o.GetConfig().FuncFilterInputRune(r)
|
r, process = o.GetConfig().FuncFilterInputRune(r)
|
||||||
if !process {
|
if !process {
|
||||||
|
o.t.KickRead()
|
||||||
o.buf.Refresh(nil) // to refresh the line
|
o.buf.Refresh(nil) // to refresh the line
|
||||||
continue // ignore this rune
|
continue // ignore this rune
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue