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
|
||||
keepInCompleteMode := false
|
||||
r := o.t.ReadRune()
|
||||
|
||||
if o.GetConfig().FuncFilterInputRune != nil {
|
||||
var process bool
|
||||
r, process = o.GetConfig().FuncFilterInputRune(r)
|
||||
if !process {
|
||||
o.t.KickRead()
|
||||
o.buf.Refresh(nil) // to refresh the line
|
||||
continue // ignore this rune
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue