mirror of https://github.com/chzyer/readline.git
Fix for non-interactive mode when there is no terminal
Originally the code called Refresh(nil). This had handling for non-interactive mode where the code would return without printing a prompt. When issue169 was initially fixed, the interactive part of this was mistakenly dropped. This puts the interactive check back into the flow.
This commit is contained in:
parent
45cb5208e8
commit
5407ea7a3c
|
@ -472,9 +472,12 @@ func (r *RuneBuffer) SetOffset(offset string) {
|
|||
}
|
||||
|
||||
func (r *RuneBuffer) Print() {
|
||||
if !r.interactive {
|
||||
return
|
||||
}
|
||||
r.Lock()
|
||||
defer r.Unlock()
|
||||
r.print()
|
||||
r.Unlock()
|
||||
}
|
||||
|
||||
func (r *RuneBuffer) print() {
|
||||
|
|
Loading…
Reference in New Issue